28 #ifndef BSL_SOURCE_LOCATION_HPP 29 #define BSL_SOURCE_LOCATION_HPP 65 file_type
const current_file,
66 func_type
const current_func,
67 line_type
const current_line) noexcept
68 : m_file{current_file}
69 , m_func{current_func}
70 , m_line{current_line}
113 file_type
const current_file = BSL_BUILTIN_FILE,
114 func_type
const current_func = BSL_BUILTIN_FUNCTION,
115 line_type
const current_line = BSL_BUILTIN_LINE) noexcept
117 return {current_file, current_func, current_line};
128 [[nodiscard]] constexpr file_type
142 [[nodiscard]] constexpr func_type
156 [[nodiscard]] constexpr line_type
184 constexpr source_location
202 [[maybe_unused]] constexpr out<T>
205 if constexpr (o.empty()) {
constexpr cstr_type reset_color
resets the color output of debug statements
Definition: color.hpp:36
constexpr line_type line() const noexcept
Returns the line location associated with the bsl::source_location.
Definition: source_location.hpp:157
constexpr bsl::char_type endl
newline constant
Definition: debug.hpp:53
constexpr file_type file_name() const noexcept
Returns the file name associated with the bsl::source_location.
Definition: source_location.hpp:129
constexpr func_type function_name() const noexcept
Returns the function name associated with the bsl::source_location.
Definition: source_location.hpp:143
This class implements the source_location specification that will eventually be included in C++20....
Definition: source_location.hpp:47
::intmax_t intmax
defines a signed integer with the maximum possible size
Definition: cstdint.hpp:95
static constexpr source_location current(file_type const current_file=BSL_BUILTIN_FILE, func_type const current_func=BSL_BUILTIN_FUNCTION, line_type const current_line=BSL_BUILTIN_LINE) noexcept
Constructs a new source_location object corresponding to the location of the call site.
Definition: source_location.hpp:112
constexpr source_location here(source_location const &sloc=source_location::current()) noexcept
This provides a less verbose version of bsl::source_location::current() to help reduce how large this...
Definition: source_location.hpp:185
char const * cstr_type
C-style string type.
Definition: cstr_type.hpp:39
constexpr cstr_type yellow
changes the foreground color to normal yellow
Definition: color.hpp:45
constexpr source_location() noexcept
Creates a default constructed source location. By default, a source location's file name is "unknown"...
Definition: source_location.hpp:80
constexpr cstr_type cyan
changes the foreground color to normal cyan
Definition: color.hpp:51