A class representing the source location of the current code.
More...
#include <SourceLocation.hpp>
|
constexpr | SourceLocation (char const *file, std::size_t line) |
| Construct a new Source Location object.
|
|
constexpr std::string_view | file_name () const |
| Get the file name.
|
|
constexpr std::size_t | line () const |
| Get the line number.
|
|
A class representing the source location of the current code.
- Note
- This is a workaround for AppleClang that is lacking source_location atm. TODO: remove this class when all compilers catch up to c++20
◆ SourceLocation()
util::SourceLocation::SourceLocation |
( |
char const * | file, |
|
|
std::size_t | line ) |
|
inlineconstexpr |
Construct a new Source Location object.
- Parameters
-
file | The file name |
line | The line number |
◆ file_name()
std::string_view util::SourceLocation::file_name |
( |
| ) |
const |
|
inlineconstexpr |
Get the file name.
- Returns
- The file name
◆ line()
std::size_t util::SourceLocation::line |
( |
| ) |
const |
|
inlineconstexpr |
Get the line number.
- Returns
- The line number
The documentation for this class was generated from the following file: