One may generally use __LINE__ and __FILE__ in C++ programs, with many toolchains, including GCC.
__LINE__
__FILE__
__LINE__ under GCC evaluates
For example use const auto name = L"" __FUNCTION__;
auto name = L"" __FUNCTION__;