Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
absl::SourceLocation Class Reference

#include <source_location.h>

Public Member Functions

constexpr SourceLocation ()
 Avoid this constructor; it populates the object with dummy values.
 
constexpr std::uint_least32_t line () const
 The line number of the captured source location.
 
constexpr const char * file_name () const
 The file name of the captured source location.
 

Static Public Member Functions

static constexpr SourceLocation DoNotInvokeDirectly (std::uint_least32_t line, const char *file_name)
 
static constexpr SourceLocation current ()
 

Friends

constexpr int UseUnused ()
 

Detailed Description

Class representing a specific location in the source code of a program. absl::SourceLocation is copyable.

Definition at line 39 of file source_location.h.

Constructor & Destructor Documentation

◆ SourceLocation()

absl::SourceLocation::SourceLocation ( )
inlineconstexpr

Avoid this constructor; it populates the object with dummy values.

Definition at line 48 of file source_location.h.

Member Function Documentation

◆ current()

static constexpr SourceLocation absl::SourceLocation::current ( )
inlinestaticconstexpr

Creates a dummy SourceLocation of "<source_location>" at line number 1, if no SourceLocation::current() implementation is available.

Definition at line 83 of file source_location.h.

◆ DoNotInvokeDirectly()

static constexpr SourceLocation absl::SourceLocation::DoNotInvokeDirectly ( std::uint_least32_t line,
const char * file_name )
inlinestaticconstexpr

Wrapper to invoke the private constructor below. This should only be used by the ABSL_LOC macro, hence the name.

Definition at line 52 of file source_location.h.

◆ file_name()

const char * absl::SourceLocation::file_name ( ) const
inlineconstexpr

The file name of the captured source location.

Definition at line 91 of file source_location.h.

◆ line()

std::uint_least32_t absl::SourceLocation::line ( ) const
inlineconstexpr

The line number of the captured source location.

Definition at line 88 of file source_location.h.

Friends And Related Symbol Documentation

◆ UseUnused

int UseUnused ( )
friend

Definition at line 105 of file source_location.h.


The documentation for this class was generated from the following file: