Eclipse doesn't recognise std::source_location, but it compiles it. What can be missing or wrong configured? Under Project Properties the Dialect is set to ISO C++23
#include <source_location>
auto foo( std::source_location location ) -> void;
Eclipse IDE for C/C++ Developers (includes Incubating components)
Version: 2025-09 (4.37.0)
Build id: 20250905-1456
I think I found the reason why it's not recognised but I can't "force" Eclipse to update it using g++-15 which I have set in the settings under "Settings" | "GCC C++ Compiler" | "Command".
Eclipse's code analysis tools don't define the macro that enables source_location. You can manually add it at Project Properties -> C/C++ General -> Preprocessor Include Paths. Select the Entries tab and for GNU C++ Add a CDT User Setting.
In the menu that pops up, select Preprocessor Macro from the # dropdown, enter __cpp_lib_source_location for Name and your C++ version, probably 202311L for Value.
I selected Treat as built-in, but it seemed to work either way
Click OK. I reflexively rebuilt the index, but I'm not certain this was necessary