28#ifndef OR_TOOLS_BASE_SOURCE_LOCATION_H_
29#define OR_TOOLS_BASE_SOURCE_LOCATION_H_
33#include "absl/base/config.h"
42 explicit PrivateTag() =
default;
57#ifdef ABSL_HAVE_SOURCE_LOCATION_CURRENT
76 PrivateTag = PrivateTag{}, std::uint_least32_t
line = __builtin_LINE(),
77 const char*
file_name = __builtin_FILE()) {
88 constexpr std::uint_least32_t
line()
const {
return line_; }
91 constexpr const char*
file_name()
const {
return file_name_; }
107 "Use the otherwise-unused member.");
113 std::uint_least32_t line_;
114 std::uint_least32_t unused_column_ = 0;
115 const char* file_name_;
122#define ABSL_LOC ::absl::SourceLocation::DoNotInvokeDirectly(__LINE__, __FILE__)
137#if ABSL_HAVE_SOURCE_LOCATION_CURRENT
138#define ABSL_LOC_CURRENT_DEFAULT_ARG = ::absl::SourceLocation::current()
140#define ABSL_LOC_CURRENT_DEFAULT_ARG
constexpr std::uint_least32_t line() const
The line number of the captured source location.
friend constexpr int UseUnused()
static constexpr SourceLocation DoNotInvokeDirectly(std::uint_least32_t line, const char *file_name)
constexpr SourceLocation()
Avoid this constructor; it populates the object with dummy values.
constexpr const char * file_name() const
The file name of the captured source location.
static constexpr SourceLocation current()