7#if __has_include(<source_location>)
8 #include <source_location>
9 #define NC_SOURCE_LOCATION std::source_location
10#elif __has_include(<experimental/source_location>)
11 #include <experimental/source_location>
12 #define NC_SOURCE_LOCATION std::experimental::source_location
18 static constexpr auto msg =
"source_location not implemented on this compiler";
20 constexpr auto file_name()
const noexcept {
return msg; }
21 constexpr auto function_name()
const noexcept {
return msg; }
22 constexpr auto line()
const noexcept {
return 0; }
23 constexpr auto column()
const noexcept {
return 0; }
27 #define NC_SOURCE_LOCATION nc::detail::PlaceholderSourceLocation
30#define NC_SOURCE_LOCATION_CURRENT NC_SOURCE_LOCATION::current()
31#define NC_SOURCE_FILE NC_SOURCE_LOCATION_CURRENT.file_name()
32#define NC_SOURCE_FUNCTION NC_SOURCE_LOCATION_CURRENT.function_name()
33#define NC_SOURCE_LINE NC_SOURCE_LOCATION_CURRENT.line()
34#define NC_SOURCE_COLUMN NC_SOURCE_LOCATION_CURRENT.column()
Definition: SourceLocation.h:17