51 const char* file = __builtin_FILE(),
53 const char* file =
"unknown",
57 const char* func = __builtin_FUNCTION(),
59 const char* func =
"unknown",
63 uint_least32_t line = __builtin_LINE(),
65 uint_least32_t line = 0,
69 uint_least32_t column = __builtin_COLUMN()
71 uint_least32_t column = 0
84 : line_(), column_(), file_("\0"), func_("\0") {}
94 constexpr uint_least32_t
column() const noexcept {
return column_; }
97 constexpr uint_least32_t
line() const noexcept {
return line_; }
100 constexpr
const char*
file_name() const noexcept {
return file_; }
106 uint_least32_t line_;
107 uint_least32_t column_;
constexpr SourceLocation() noexcept
Definition: source_location.h:83
constexpr const char * file_name() const noexcept
return the file name represented by this object
Definition: source_location.h:100
constexpr uint_least32_t column() const noexcept
return the column number represented by this object
Definition: source_location.h:94
static constexpr SourceLocation current(const char *file="unknown", const char *func="unknown", uint_least32_t line=0, uint_least32_t column=0) noexcept
Definition: source_location.h:49
constexpr uint_least32_t line() const noexcept
return the line number represented by this object
Definition: source_location.h:97
#define STX_END_NAMESPACE
Definition: config.h:329
#define STX_HAS_BUILTIN(feature)
Definition: config.h:214
Definition: source_location.h:48
#define STX_BEGIN_NAMESPACE
Definition: config.h:325
constexpr const char * function_name() const noexcept
return the name of the function represented by this object, if any
Definition: source_location.h:103