diff --git a/.github/scripts/conan/generate_matrix.py b/.github/scripts/conan/generate_matrix.py index 34ccaaf4f..7d0b30f28 100755 --- a/.github/scripts/conan/generate_matrix.py +++ b/.github/scripts/conan/generate_matrix.py @@ -6,7 +6,7 @@ LINUX_OS = ["heavy", "heavy-arm64"] LINUX_CONTAINERS = ['{ "image": "ghcr.io/xrplf/xrpld/nix-ubuntu:sha-cb2642b" }'] LINUX_COMPILERS = ["gcc", "clang"] -MACOS_OS = ["macos15"] +MACOS_OS = ["macos-26-apple-clang-21"] MACOS_CONTAINERS = [""] MACOS_COMPILERS = ["apple-clang"] diff --git a/.github/scripts/conan/regenerate_lockfile.sh b/.github/scripts/conan/regenerate_lockfile.sh index b842ee986..c5603ad8e 100755 --- a/.github/scripts/conan/regenerate_lockfile.sh +++ b/.github/scripts/conan/regenerate_lockfile.sh @@ -22,4 +22,4 @@ rm -f conan.lock # Create a new lockfile that is compatible with macOS. # It should also work on Linux. conan lock create . \ - --profile:all=./conan/profiles/apple-clang-17.profile + --profile:all=./conan/profiles/apple-clang-21.profile diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 06a212886..7ec0af6e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,7 +50,7 @@ jobs: container: ['{ "image": "ghcr.io/xrplf/xrpld/nix-ubuntu:sha-cb2642b" }'] include: - - os: macos15 + - os: macos-26-apple-clang-21 compiler: apple-clang build_type: Release container: "" diff --git a/.github/workflows/check-libxrpl.yml b/.github/workflows/check-libxrpl.yml index b051e3380..d7662f62a 100644 --- a/.github/workflows/check-libxrpl.yml +++ b/.github/workflows/check-libxrpl.yml @@ -29,7 +29,7 @@ jobs: fetch-depth: 0 - name: Prepare runner - uses: XRPLF/actions/prepare-runner@90f11ee655d1687824fb8793db770477d52afbab + uses: XRPLF/actions/prepare-runner@9355d190fd7d4de80fadfd161e6edddc9702cd9f with: enable_ccache: false diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 71851d581..3617b89fb 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -39,7 +39,7 @@ jobs: lfs: true - name: Prepare runner - uses: XRPLF/actions/prepare-runner@90f11ee655d1687824fb8793db770477d52afbab + uses: XRPLF/actions/prepare-runner@9355d190fd7d4de80fadfd161e6edddc9702cd9f with: enable_ccache: false diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index cb3a7081f..25d792ee1 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -47,7 +47,7 @@ jobs: fail-fast: false matrix: include: - - os: macos15 + - os: macos-26-apple-clang-21 compiler: apple-clang build_type: Release - os: heavy @@ -108,7 +108,7 @@ jobs: - os: heavy compiler: clang container: '{ "image": "ghcr.io/xrplf/xrpld/nix-ubuntu:sha-cb2642b" }' - - os: macos15 + - os: macos-26-apple-clang-21 compiler: apple-clang container: "" uses: ./.github/workflows/reusable-build.yml diff --git a/.github/workflows/pre-commit-autoupdate.yml b/.github/workflows/pre-commit-autoupdate.yml index 5d79fec76..771de763c 100644 --- a/.github/workflows/pre-commit-autoupdate.yml +++ b/.github/workflows/pre-commit-autoupdate.yml @@ -12,7 +12,7 @@ on: jobs: auto-update: - uses: XRPLF/actions/.github/workflows/pre-commit-autoupdate.yml@5e942d61bf32f7557a7c159cfac4712a687b3e3a + uses: XRPLF/actions/.github/workflows/pre-commit-autoupdate.yml@c7045074aafe9fb92fa537aa4446f81fbfc17e8b with: sign_commit: true committer: "Clio CI " diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index ccc351928..3dd3e1db4 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -8,7 +8,7 @@ on: jobs: run-hooks: - uses: XRPLF/actions/.github/workflows/pre-commit.yml@cba1f0891650baf1a9c88624dc2d72573be2eb81 + uses: XRPLF/actions/.github/workflows/pre-commit.yml@e06d4138c9ec8dceeb7c818645faa38087ea9e3d with: runs_on: heavy container: '{ "image": "ghcr.io/xrplf/clio-pre-commit:14342e087ceb8b593027198bf9ef06a43833c696" }' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2b7bc4271..7c674ff43 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: fail-fast: false matrix: include: - - os: macos15 + - os: macos-26-apple-clang-21 compiler: apple-clang build_type: Release - os: heavy diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index d93c41d28..2e0a37070 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -96,7 +96,7 @@ jobs: fetch-depth: 0 - name: Prepare runner - uses: XRPLF/actions/prepare-runner@90f11ee655d1687824fb8793db770477d52afbab + uses: XRPLF/actions/prepare-runner@9355d190fd7d4de80fadfd161e6edddc9702cd9f with: enable_ccache: ${{ inputs.download_ccache }} diff --git a/.github/workflows/reusable-release.yml b/.github/workflows/reusable-release.yml index e289cd11e..928eb4ded 100644 --- a/.github/workflows/reusable-release.yml +++ b/.github/workflows/reusable-release.yml @@ -60,7 +60,7 @@ jobs: fetch-depth: 0 - name: Prepare runner - uses: XRPLF/actions/prepare-runner@90f11ee655d1687824fb8793db770477d52afbab + uses: XRPLF/actions/prepare-runner@9355d190fd7d4de80fadfd161e6edddc9702cd9f with: enable_ccache: false diff --git a/.github/workflows/upload-conan-deps.yml b/.github/workflows/upload-conan-deps.yml index 764212086..635116cb4 100644 --- a/.github/workflows/upload-conan-deps.yml +++ b/.github/workflows/upload-conan-deps.yml @@ -75,7 +75,7 @@ jobs: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Prepare runner - uses: XRPLF/actions/prepare-runner@90f11ee655d1687824fb8793db770477d52afbab + uses: XRPLF/actions/prepare-runner@9355d190fd7d4de80fadfd161e6edddc9702cd9f with: enable_ccache: false diff --git a/CMakeLists.txt b/CMakeLists.txt index ac15517dd..f244af698 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,7 +72,6 @@ endif() # Clio tweaks and checks include(CheckCompiler) include(Settings) -include(SourceLocation) include(PatchNixBinary) # Clio deps diff --git a/conan.lock b/conan.lock index 2b229275c..57873fe65 100644 --- a/conan.lock +++ b/conan.lock @@ -5,33 +5,33 @@ "xxhash/0.8.3#681d36a0a6111fc56e5e45ea182c19cc%1782392402.420688", "xrpl/3.2.0#c3c124909c6461012758a4fab7c90cd5%1782492037.328253", "sqlite3/3.53.0#324ada52333108388a9a6108bfa96734%1782392403.185447", - "spdlog/1.17.0#bcbaaf7147bda6ad24ffbd1ac3d7142c%1767636069.964", + "spdlog/1.17.0#bcbaaf7147bda6ad24ffbd1ac3d7142c%1782736610.443882", "soci/4.0.3#e726491a03468795453f7c83fc924a96%1782392402.679521", "snappy/1.1.10#968fef506ff261592ec30c574d4a7809%1782307151.633168", "secp256k1/0.7.1#b1f450b7f78a36fff75bb6934a356f3a%1782338841.3729", "rocksdb/10.5.1#4a197eca381a3e5ae8adf8cffa5aacd0%1782392413.075713", "re2/20251105#8579cfd0bda4daf0683f9e3898f964b4%1782392402.431897", - "rapidjson/cci.20220822#1b9d8c2256876a154172dc5cfbe447c6%1705070244.747", + "rapidjson/cci.20220822#1b9d8c2256876a154172dc5cfbe447c6%1782736605.214886", "protobuf/6.33.5#ff253ead763bd8d9904a52979cd21e81%1782392410.233933", "openssl/3.6.3#1163d4ddc603907084d08a6a0c6e580f%1782307150.583886", "nudb/2.0.9#11149c73f8f2baff9a0198fe25971fc7%1782392402.297166", - "minizip/1.2.13#64dfec2ee447ab6c0c7eab967815a762%1781620490.148", + "minizip/1.2.13#64dfec2ee447ab6c0c7eab967815a762%1782736605.272739", "lz4/1.10.0#982d9b673900f665a1da109e09c17cab%1782392402.164188", - "libuv/1.46.0#e1a592bf7c0f37802889ca2c795fb26c%1764745187.942", + "libuv/1.46.0#e1a592bf7c0f37802889ca2c795fb26c%1782736605.776567", "libiconv/1.17#9923bc6dc6f106646d6967e0039a5ada%1782392792.775744", "libbacktrace/cci.20210118#a7691bfccd8caaf66309df196790a5a1%1782392402.420732", "libarchive/3.8.7#c446109bd1f1d8ba7936c94189bc50e6%1782392403.066892", - "http_parser/2.9.4#98d91690d6fd021e9e624218a85d9d97%1743410856.678", + "http_parser/2.9.4#98d91690d6fd021e9e624218a85d9d97%1782736605.237778", "gtest/1.17.0#5224b3b3ff3b4ce1133cbdd27d53ee7d%1782392402.791979", - "grpc/1.78.1#b1a9e74b145cc471bed4dc64dc6eb2c1%1772623605.068", - "fmt/12.1.0#50abab23274d56bb8f42c94b3b9a40c7%1761885265.231", + "grpc/1.78.1#b1a9e74b145cc471bed4dc64dc6eb2c1%1782736970.619035", + "fmt/12.1.0#50abab23274d56bb8f42c94b3b9a40c7%1782736606.427131", "ed25519/2015.03#ae761bdc52730a843f0809bdf6c1b1f6%1782307148.15562", "date/3.0.4#862e11e80030356b53c2c38599ceb32b%1782392402.538492", - "cassandra-cpp-driver/2.17.0#bd3934138689482102c265d01288a316%1764097402.445", + "cassandra-cpp-driver/2.17.0#bd3934138689482102c265d01288a316%1782736662.877646", "c-ares/1.34.6#545240bb1c40e2cacd4362d6b8967650%1782392402.681654", "bzip2/1.0.8#c470882369c2d95c5c77e970c0c7e321%1782392402.296732", "boost/1.91.0#ea540ca2133d831b560036aa24dece3c%1782392419.475605", - "benchmark/1.9.5#b885dc73ad67b40a55d45684d1c88ad1%1774363287.434", + "benchmark/1.9.5#b885dc73ad67b40a55d45684d1c88ad1%1782736613.864841", "abseil/20250127.0#bb0baf1f362bc4a725a24eddd419b8f7%1782307147.395833" ], "build_requires": [ diff --git a/conan/init.sh b/conan/init.sh index 625d16d78..107285424 100755 --- a/conan/init.sh +++ b/conan/init.sh @@ -20,11 +20,6 @@ mkdir -p "$PROFILES_DIR" # `.github/actions/set-compiler-env`) and the sanitizers via the `SANITIZERS` # environment variable. Builds always use the `ci` profile, which includes # `sanitizers` and `default`. +cp "$PROFILES_SRC_DIR/default" "$PROFILES_DIR/default" cp "$PROFILES_SRC_DIR/ci" "$PROFILES_DIR/ci" cp "$PROFILES_SRC_DIR/sanitizers" "$PROFILES_DIR/sanitizers" - -if [[ "$(uname)" == "Darwin" ]]; then - cp "$PROFILES_SRC_DIR/apple-clang-17.profile" "$PROFILES_DIR/default" -else - cp "$PROFILES_SRC_DIR/default" "$PROFILES_DIR/default" -fi diff --git a/conan/profiles/apple-clang-17.profile b/conan/profiles/apple-clang-21.profile similarity index 53% rename from conan/profiles/apple-clang-17.profile rename to conan/profiles/apple-clang-21.profile index 5c3d44c99..023c8b448 100644 --- a/conan/profiles/apple-clang-17.profile +++ b/conan/profiles/apple-clang-21.profile @@ -4,8 +4,5 @@ build_type=Release compiler=apple-clang compiler.cppstd=20 compiler.libcxx=libc++ -compiler.version=17.0 +compiler.version=21.0 os=Macos - -[conf] -grpc/1.50.1:tools.build:cxxflags+=["-Wno-missing-template-arg-list-after-template-kw"] diff --git a/conan/profiles/default b/conan/profiles/default index 4aee5b3e0..7302f9d92 100644 --- a/conan/profiles/default +++ b/conan/profiles/default @@ -18,11 +18,3 @@ compiler.runtime=static {% else %} compiler.libcxx={{detect_api.detect_libcxx(compiler, version, compiler_exe)}} {% endif %} - -[conf] -{% if compiler == "gcc" and compiler_version < 13 %} -tools.build:cxxflags+=['-Wno-restrict'] -{% endif %} -{% if compiler == "clang" %} -grpc/1.50.1:tools.build:cxxflags+=['-Wno-missing-template-arg-list-after-template-kw'] -{% endif %} diff --git a/src/util/Assert.hpp b/src/util/Assert.hpp index 03ea659a5..ba274c02b 100644 --- a/src/util/Assert.hpp +++ b/src/util/Assert.hpp @@ -1,7 +1,5 @@ #pragma once -#include "util/SourceLocation.hpp" - #include #include @@ -53,7 +51,7 @@ private: template constexpr void assertImpl( - SourceLocationType const location, + std::source_location const location, char const* expression, bool const condition, fmt::format_string format, @@ -86,7 +84,7 @@ assertImpl( } // namespace util::impl -#define ASSERT(condition, ...) \ - util::impl::assertImpl( \ - CURRENT_SRC_LOCATION, #condition, static_cast(condition), __VA_ARGS__ \ +#define ASSERT(condition, ...) \ + util::impl::assertImpl( \ + std::source_location::current(), #condition, static_cast(condition), __VA_ARGS__ \ ) diff --git a/src/util/SourceLocation.hpp b/src/util/SourceLocation.hpp deleted file mode 100644 index a158f2d8c..000000000 --- a/src/util/SourceLocation.hpp +++ /dev/null @@ -1,81 +0,0 @@ -#pragma once - -#if defined(HAS_SOURCE_LOCATION) && __has_builtin(__builtin_source_location) -// this is used by fully compatible compilers like gcc -#include - -#elif defined(HAS_EXPERIMENTAL_SOURCE_LOCATION) -// this is used by clang on linux where source_location is still not out of -// experimental headers -#include - -#else - -#include -#include -#endif - -namespace util { - -#if defined(HAS_SOURCE_LOCATION) && __has_builtin(__builtin_source_location) -using SourceLocationType = std::source_location; - -#elif defined(HAS_EXPERIMENTAL_SOURCE_LOCATION) -using SourceLocationType = std::experimental::source_location; - -#else -/** - * @brief 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 - */ -class SourceLocation { - char const* file_; - std::size_t line_; - -public: - /** - * @brief Construct a new Source Location object - * - * @param file The file name - * @param line The line number - */ - constexpr SourceLocation(char const* file, std::size_t line) : file_{file}, line_{line} - { - } - - /** - * @brief Get the file name - * - * @return The file name - */ - constexpr std::string_view - file_name() const - { - return file_; - } - - /** - * @brief Get the line number - * - * @return The line number - */ - constexpr std::size_t - line() const - { - return line_; - } -}; -using SourceLocationType = SourceLocation; -#define SOURCE_LOCATION_OLD_API - -#endif - -} // namespace util - -#if defined(SOURCE_LOCATION_OLD_API) -#define CURRENT_SRC_LOCATION util::SourceLocationType(__FILE__, __LINE__) -#else -#define CURRENT_SRC_LOCATION util::SourceLocationType::current() -#endif diff --git a/src/util/log/Logger.cpp b/src/util/log/Logger.cpp index 869947500..7a28b3064 100644 --- a/src/util/log/Logger.cpp +++ b/src/util/log/Logger.cpp @@ -2,7 +2,6 @@ #include "util/Assert.hpp" #include "util/BytesConverter.hpp" -#include "util/SourceLocation.hpp" #include "util/config/ArrayView.hpp" #include "util/config/ConfigDefinition.hpp" #include "util/config/ObjectView.hpp" @@ -29,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -405,37 +405,37 @@ LogService::shutdown() } Logger::Pump -LogService::trace(SourceLocationType const& loc) +LogService::trace(std::source_location const& loc) { return Logger(spdlog::default_logger()).trace(loc); } Logger::Pump -LogService::debug(SourceLocationType const& loc) +LogService::debug(std::source_location const& loc) { return Logger(spdlog::default_logger()).debug(loc); } Logger::Pump -LogService::info(SourceLocationType const& loc) +LogService::info(std::source_location const& loc) { return Logger(spdlog::default_logger()).info(loc); } Logger::Pump -LogService::warn(SourceLocationType const& loc) +LogService::warn(std::source_location const& loc) { return Logger(spdlog::default_logger()).warn(loc); } Logger::Pump -LogService::error(SourceLocationType const& loc) +LogService::error(std::source_location const& loc) { return Logger(spdlog::default_logger()).error(loc); } Logger::Pump -LogService::fatal(SourceLocationType const& loc) +LogService::fatal(std::source_location const& loc) { return Logger(spdlog::default_logger()).fatal(loc); } @@ -469,7 +469,7 @@ Logger::~Logger() Logger::Pump::Pump( std::shared_ptr logger, Severity sev, - SourceLocationType const& loc + std::source_location const& loc ) : logger_(std::move(logger)) , severity_(sev) @@ -489,32 +489,32 @@ Logger::Pump::~Pump() } Logger::Pump -Logger::trace(SourceLocationType const& loc) const +Logger::trace(std::source_location const& loc) const { return {logger_, Severity::TRC, loc}; } Logger::Pump -Logger::debug(SourceLocationType const& loc) const +Logger::debug(std::source_location const& loc) const { return {logger_, Severity::DBG, loc}; } Logger::Pump -Logger::info(SourceLocationType const& loc) const +Logger::info(std::source_location const& loc) const { return {logger_, Severity::NFO, loc}; } Logger::Pump -Logger::warn(SourceLocationType const& loc) const +Logger::warn(std::source_location const& loc) const { return {logger_, Severity::WRN, loc}; } Logger::Pump -Logger::error(SourceLocationType const& loc) const +Logger::error(std::source_location const& loc) const { return {logger_, Severity::ERR, loc}; } Logger::Pump -Logger::fatal(SourceLocationType const& loc) const +Logger::fatal(std::source_location const& loc) const { return {logger_, Severity::FTL, loc}; } diff --git a/src/util/log/Logger.hpp b/src/util/log/Logger.hpp index 32c814380..9120cd5bc 100644 --- a/src/util/log/Logger.hpp +++ b/src/util/log/Logger.hpp @@ -1,13 +1,12 @@ #pragma once -#include "util/SourceLocation.hpp" - #include #include #include #include #include #include +#include #include #include #include @@ -88,14 +87,14 @@ class Logger { class Pump final { std::shared_ptr logger_; Severity const severity_; - SourceLocationType const sourceLocation_; + std::source_location const sourceLocation_; std::ostringstream stream_; bool const enabled_; public: ~Pump(); - Pump(std::shared_ptr logger, Severity sev, SourceLocationType const& loc); + Pump(std::shared_ptr logger, Severity sev, std::source_location const& loc); Pump(Pump&&) = delete; Pump(Pump const&) = delete; @@ -170,7 +169,7 @@ public: * @return The pump to use for logging */ [[nodiscard]] Pump - trace(SourceLocationType const& loc = CURRENT_SRC_LOCATION) const; + trace(std::source_location const& loc = std::source_location::current()) const; /** * @brief Interface for logging at Severity::DBG severity @@ -179,7 +178,7 @@ public: * @return The pump to use for logging */ [[nodiscard]] Pump - debug(SourceLocationType const& loc = CURRENT_SRC_LOCATION) const; + debug(std::source_location const& loc = std::source_location::current()) const; /** * @brief Interface for logging at Severity::NFO severity @@ -188,7 +187,7 @@ public: * @return The pump to use for logging */ [[nodiscard]] Pump - info(SourceLocationType const& loc = CURRENT_SRC_LOCATION) const; + info(std::source_location const& loc = std::source_location::current()) const; /** * @brief Interface for logging at Severity::WRN severity @@ -197,7 +196,7 @@ public: * @return The pump to use for logging */ [[nodiscard]] Pump - warn(SourceLocationType const& loc = CURRENT_SRC_LOCATION) const; + warn(std::source_location const& loc = std::source_location::current()) const; /** * @brief Interface for logging at Severity::ERR severity @@ -206,7 +205,7 @@ public: * @return The pump to use for logging */ [[nodiscard]] Pump - error(SourceLocationType const& loc = CURRENT_SRC_LOCATION) const; + error(std::source_location const& loc = std::source_location::current()) const; /** * @brief Interface for logging at Severity::FTL severity @@ -215,7 +214,7 @@ public: * @return The pump to use for logging */ [[nodiscard]] Pump - fatal(SourceLocationType const& loc = CURRENT_SRC_LOCATION) const; + fatal(std::source_location const& loc = std::source_location::current()) const; private: Logger(std::shared_ptr logger); @@ -333,7 +332,7 @@ public: * @return The pump to use for logging */ [[nodiscard]] static Logger::Pump - trace(SourceLocationType const& loc = CURRENT_SRC_LOCATION); + trace(std::source_location const& loc = std::source_location::current()); /** * @brief Globally accessible General logger at Severity::DBG severity @@ -342,7 +341,7 @@ public: * @return The pump to use for logging */ [[nodiscard]] static Logger::Pump - debug(SourceLocationType const& loc = CURRENT_SRC_LOCATION); + debug(std::source_location const& loc = std::source_location::current()); /** * @brief Globally accessible General logger at Severity::NFO severity @@ -351,7 +350,7 @@ public: * @return The pump to use for logging */ [[nodiscard]] static Logger::Pump - info(SourceLocationType const& loc = CURRENT_SRC_LOCATION); + info(std::source_location const& loc = std::source_location::current()); /** * @brief Globally accessible General logger at Severity::WRN severity @@ -360,7 +359,7 @@ public: * @return The pump to use for logging */ [[nodiscard]] static Logger::Pump - warn(SourceLocationType const& loc = CURRENT_SRC_LOCATION); + warn(std::source_location const& loc = std::source_location::current()); /** * @brief Globally accessible General logger at Severity::ERR severity @@ -369,7 +368,7 @@ public: * @return The pump to use for logging */ [[nodiscard]] static Logger::Pump - error(SourceLocationType const& loc = CURRENT_SRC_LOCATION); + error(std::source_location const& loc = std::source_location::current()); /** * @brief Globally accessible General logger at Severity::FTL severity @@ -378,7 +377,7 @@ public: * @return The pump to use for logging */ [[nodiscard]] static Logger::Pump - fatal(SourceLocationType const& loc = CURRENT_SRC_LOCATION); + fatal(std::source_location const& loc = std::source_location::current()); private: /** diff --git a/tests/unit/util/log/PrettyPathTests.cpp b/tests/unit/util/log/PrettyPathTests.cpp index f511c6404..a79268213 100644 --- a/tests/unit/util/log/PrettyPathTests.cpp +++ b/tests/unit/util/log/PrettyPathTests.cpp @@ -1,16 +1,16 @@ #include "util/MockAssert.hpp" -#include "util/SourceLocation.hpp" #include "util/log/PrettyPath.hpp" #include +#include #include using namespace util; TEST(PrettyPath, CurrentFile) { - auto loc = CURRENT_SRC_LOCATION; + auto loc = std::source_location::current(); auto pretty = prettyPath(loc.file_name()); EXPECT_EQ(pretty, "util/log/PrettyPathTests.cpp"); }