diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2023-06-23 14:57:00 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2023-06-23 14:59:44 +0300 |
commit | d85418e397ffffb2446eac9799b381502518b780 (patch) | |
tree | 1002299c81d91f228f58a42d74c62ae387b1df53 /include | |
parent | 6995c1ce42d5bc2d223af7d3b2f3cae613d3b231 (diff) | |
download | bmcweb-d85418e397ffffb2446eac9799b381502518b780.tar.xz |
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 <patrick@stwcx.xyz>
Change-Id: Id55bdf01855206c6892684e1e56cc5ff56e2b5a2
Diffstat (limited to 'include')
-rw-r--r-- | include/source_location.hpp | 27 |
1 files changed, 0 insertions, 27 deletions
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 <source_location> 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 <source_location> - -namespace bmcweb -{ -using source_location = std::source_location; -} - -#else -#include <experimental/source_location> - -namespace bmcweb -{ -using source_location = std::experimental::source_location; -} - -#endif |