exception: remove source_location indirect
clang-16 now natively supports std::source_location so we do not need
the experimental indirection. Clean up the code.
Tested: Compiled with `CXX=clang++`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Iabb10a603e1451228e27948fb0791b9db4791ec7
diff --git a/include/stdplus/exception.hpp b/include/stdplus/exception.hpp
index 059f17f..a3b9866 100644
--- a/include/stdplus/exception.hpp
+++ b/include/stdplus/exception.hpp
@@ -5,24 +5,10 @@
#include <system_error>
#include <utility>
-#if __has_builtin(__builtin_source_location)
-#include <source_location>
-#else
-#include <experimental/source_location>
-#endif
-
namespace stdplus
{
namespace exception
{
-namespace detail
-{
-#if __has_builtin(__builtin_source_location)
-using source_location = std::source_location;
-#else
-using source_location = std::experimental::source_location;
-#endif
-} // namespace detail
struct WouldBlock : public std::system_error
{
@@ -64,8 +50,8 @@
}
template <typename F>
-auto ignore(F&& f, const detail::source_location location =
- detail::source_location::current()) noexcept
+auto ignore(F&& f, const std::source_location location =
+ std::source_location::current()) noexcept
{
return ignore(std::forward<F>(f), location.file_name(), location.line(),
location.function_name());