9 #include "quill/core/Attributes.h" 12 #if !defined(QUILL_BUILTIN_FUNCTION_NAME) 13 #if defined(QUILL_DISABLE_FUNCTION_NAME) 14 #define QUILL_BUILTIN_FUNCTION_NAME "" 16 #define QUILL_BUILTIN_FUNCTION_NAME __builtin_FUNCTION() 20 #if !defined(QUILL_BUILTIN_FILE_NAME) 21 #if defined(QUILL_DISABLE_FILE_INFO) 22 #define QUILL_BUILTIN_FILE_NAME "" 24 #define QUILL_BUILTIN_FILE_NAME __builtin_FILE() 28 #if !defined(QUILL_BUILTIN_LINE_NO) 29 #if defined(QUILL_DISABLE_FILE_INFO) 30 #define QUILL_BUILTIN_LINE_NO 0u 32 #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
char const* file_name()
const noexcept {
return _file; }
55 QUILL_NODISCARD constexpr
char const* 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