11 #include "quill/core/Attributes.h" 14 #if !defined(QUILL_BUILTIN_FUNCTION_NAME) 15 #if defined(QUILL_DISABLE_FUNCTION_NAME) 16 #define QUILL_BUILTIN_FUNCTION_NAME "" 18 #define QUILL_BUILTIN_FUNCTION_NAME __builtin_FUNCTION() 22 #if !defined(QUILL_BUILTIN_FILE_NAME) 23 #if defined(QUILL_DISABLE_FILE_INFO) 24 #define QUILL_BUILTIN_FILE_NAME "" 26 #define QUILL_BUILTIN_FILE_NAME __builtin_FILE() 30 #if !defined(QUILL_BUILTIN_LINE_NO) 31 #if defined(QUILL_DISABLE_FILE_INFO) 32 #define QUILL_BUILTIN_LINE_NO 0u 34 #define QUILL_BUILTIN_LINE_NO __builtin_LINE() 42 static constexpr
SourceLocation current(
char const* file = QUILL_BUILTIN_FILE_NAME,
43 char const*
function = QUILL_BUILTIN_FUNCTION_NAME,
44 std::uint_least32_t line = QUILL_BUILTIN_LINE_NO) noexcept
49 constexpr
SourceLocation(
char const* file,
char const*
function, std::uint_least32_t line)
50 : _file(file), _function(
function), _line(line)
54 QUILL_NODISCARD constexpr
const char* file_name()
const noexcept {
return _file; }
55 QUILL_NODISCARD constexpr
const char* function_name()
const noexcept {
return _function; }
56 QUILL_NODISCARD constexpr std::uint_least32_t line()
const noexcept {
return _line; }
60 char const* _function;
61 std::uint_least32_t _line;
Definition: SourceLocation.h:40