From 146f4171b39ce22f4526cd097165b0ac97e63fff Mon Sep 17 00:00:00 2001 From: Valentin Volkl <valentin.volkl@cern.ch> Date: Sat, 26 Nov 2022 23:27:39 +0100 Subject: [PATCH] workaround for missing std::source_location in apple-clang --- GaudiPluginService/include/Gaudi/PluginServiceV2.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/GaudiPluginService/include/Gaudi/PluginServiceV2.h b/GaudiPluginService/include/Gaudi/PluginServiceV2.h index 7dac7144f1..88a93f4874 100644 --- a/GaudiPluginService/include/Gaudi/PluginServiceV2.h +++ b/GaudiPluginService/include/Gaudi/PluginServiceV2.h @@ -29,11 +29,19 @@ namespace Gaudi::PluginService::Details { using std::source_location; } -#elif __cplusplus >= 201402L +#elif __cplusplus >= 201402L && __has_include( <experimental/source_location> ) && false # include <experimental/source_location> namespace Gaudi::PluginService::Details { using std::experimental::source_location; } +#else +namespace Gaudi::PluginService::Details { + struct source_location { + std::string file_name() {return "";}; + std::string line() {return "";} + static constexpr source_location current() { return source_location();} + }; +} #endif namespace Gaudi { -- GitLab