12 #ifndef PLSSVM_EXCEPTIONS_SOURCE_LOCATION_HPP_
13 #define PLSSVM_EXCEPTIONS_SOURCE_LOCATION_HPP_
17 #include <string_view>
38 int line = __builtin_LINE(),
65 [[nodiscard]] constexpr std::uint_least32_t
line() const noexcept {
return line_; }
71 [[nodiscard]] constexpr std::uint_least32_t
column() const noexcept {
return column_; }
The plssvm::source_location class represents certain information about the source code,...
Definition: source_location.hpp:25
const char * file_name_
The file name as retrieved by __builtin_FILE().
Definition: source_location.hpp:79
std::uint_least32_t column_
The column number (always 0).
Definition: source_location.hpp:77
constexpr std::uint_least32_t column() const noexcept
Returns the column number.
Definition: source_location.hpp:71
constexpr std::string_view file_name() const noexcept
Returns the function name without additional signature information (i.e. return type and parameters) ...
Definition: source_location.hpp:60
std::uint_least32_t line_
The line number as retrieved by __builtin_LINE().
Definition: source_location.hpp:75
const char * function_name_
The function name as retrieved by __builtin_FUNCTION().
Definition: source_location.hpp:81
constexpr std::uint_least32_t line() const noexcept
Returns the line number or 0 if no information could be retrieved.
Definition: source_location.hpp:65
constexpr std::string_view function_name() const noexcept
Returns the absolute path name of the file or "unknown" if no information could be retrieved.
Definition: source_location.hpp:54
static constexpr source_location current(const char *file_name=__builtin_FILE(), const char *function_name=__builtin_FUNCTION(), int line=__builtin_LINE(), int column=0) noexcept
Construct new source location information about the current call side.
Definition: source_location.hpp:35
The main namespace containing all public API functions.
Definition: backend_types.hpp:24