GCC provides three magic constants that hold the name of the current function as a string. In C++11 and later modes, all three are treated as constant expressions and can be used in constexpr contexts. The first of these constants is __func__, which is part of the C99 standard.