--- a/ortools/base/source_location.h 2026-01-09 13:10:50.000000000 +0100 +++ b/ortools/base/source_location.h 2026-10-19 18:11:06.717561872 +0200 @@ -32,6 +32,13 @@ #include "absl/base/config.h" +// newer Abseil ships absl::SourceLocation itself +#if __has_include("absl/types/source_location.h") +#include "absl/types/source_location.h" +#define ABSL_LOC ::absl::SourceLocation::current() +#define ABSL_LOC_CURRENT_DEFAULT_ARG = ::absl::SourceLocation::current() +#else + namespace absl { // Class representing a specific location in the source code of a program. @@ -140,4 +147,6 @@ class SourceLocation { #define ABSL_LOC_CURRENT_DEFAULT_ARG #endif +#endif // __has_include("absl/types/source_location.h") + #endif // ORTOOLS_BASE_SOURCE_LOCATION_H_