Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
source_location.h File Reference
#include <cstdint>
#include "absl/base/config.h"

Go to the source code of this file.

Classes

class  absl::SourceLocation
 

Namespaces

namespace  absl
 

Macros

#define ABSL_LOC   ::absl::SourceLocation::DoNotInvokeDirectly(__LINE__, __FILE__)
 
#define ABSL_LOC_CURRENT_DEFAULT_ARG
 

Macro Definition Documentation

◆ ABSL_LOC

#define ABSL_LOC   ::absl::SourceLocation::DoNotInvokeDirectly(__LINE__, __FILE__)

If a function takes an absl::SourceLocation parameter, pass this as the argument.

Definition at line 122 of file source_location.h.

◆ ABSL_LOC_CURRENT_DEFAULT_ARG

#define ABSL_LOC_CURRENT_DEFAULT_ARG

ABSL_LOC_CURRENT_DEFAULT_ARG

Specifies that a function should use absl::SourceLocation::current() on platforms where it will return useful information, but require explicitly passing ABSL_LOC on platforms where it would return dummy information.

Usage:

void MyLog(absl::string_view msg, absl::SourceLocation loc ABSL_LOC_CURRENT_DEFAULT_ARG) { std::cout << loc.file_name() << "@" << loc.line() << ": " << msg; }

Definition at line 140 of file source_location.h.