From d85418e397ffffb2446eac9799b381502518b780 Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Fri, 23 Jun 2023 06:57:00 -0500 Subject: error_messages: remove source_location indirect clang-16 now supports std::source_location so remove the indirection that uses experimental::source_location in some cases. Tested: Compiled with `CXX=clang++`. Signed-off-by: Patrick Williams Change-Id: Id55bdf01855206c6892684e1e56cc5ff56e2b5a2 --- include/source_location.hpp | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 include/source_location.hpp (limited to 'include') diff --git a/include/source_location.hpp b/include/source_location.hpp deleted file mode 100644 index 9880752d66..0000000000 --- a/include/source_location.hpp +++ /dev/null @@ -1,27 +0,0 @@ -#pragma once - -// As of clang-12, clang still doesn't support std::source_location, which -// means that clang-tidy also doesn't support std::source_location. -// Inside the libstdc++ implementation of is this check of -// __builtin_source_location to determine if the compiler supports the -// necessary bits for std::source_location, and if not the header ends up doing -// nothing. Use this same builtin-check to detect when we're running under -// an "older" clang and fallback to std::experimental::source_location instead. - -#if __has_builtin(__builtin_source_location) -#include - -namespace bmcweb -{ -using source_location = std::source_location; -} - -#else -#include - -namespace bmcweb -{ -using source_location = std::experimental::source_location; -} - -#endif -- cgit v1.2.3