29 #ifndef _GLIBCXX_SRCLOC
30 #define _GLIBCXX_SRCLOC 1
32 #if __cplusplus > 201703L && __has_builtin(__builtin_source_location)
37 _GLIBCXX_BEGIN_NAMESPACE_VERSION
39 #define __cpp_lib_source_location 201907L
45 using uint_least32_t = __UINT_LEAST32_TYPE__;
51 current(
const void* __p = __builtin_source_location()) noexcept
54 __ret._M_impl =
static_cast <const __impl*
>(__p);
61 constexpr uint_least32_t
63 {
return _M_impl ? _M_impl->_M_line : 0u; }
65 constexpr uint_least32_t
66 column()
const noexcept
67 {
return _M_impl ? _M_impl->_M_column : 0u; }
70 file_name()
const noexcept
71 {
return _M_impl ? _M_impl->_M_file_name :
""; }
74 function_name()
const noexcept
75 {
return _M_impl ? _M_impl->_M_function_name :
""; }
80 const char* _M_file_name;
81 const char* _M_function_name;
86 const __impl* _M_impl =
nullptr;
89 _GLIBCXX_END_NAMESPACE_VERSION
ISO C++ entities toplevel namespace is std.
A class that describes a location in source code.