aboutsummaryrefslogtreecommitdiff
path: root/zencore/include
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-12-15 13:40:58 +0100
committerMartin Ridgers <[email protected]>2021-12-16 09:35:51 +0100
commit8b013702277fa813a838a6b55d7506c81ca1f1ac (patch)
tree5da8f7cac8b9b70aba1d5765685327d79ce1ba50 /zencore/include
parentDeleted unused include (diff)
downloadzen-8b013702277fa813a838a6b55d7506c81ca1f1ac.tar.xz
zen-8b013702277fa813a838a6b55d7506c81ca1f1ac.zip
Compile out source_location use if the toolchain doesn't support it
Diffstat (limited to 'zencore/include')
-rw-r--r--zencore/include/zencore/except.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/zencore/include/zencore/except.h b/zencore/include/zencore/except.h
index e0e4aaae0..6719c1319 100644
--- a/zencore/include/zencore/except.h
+++ b/zencore/include/zencore/except.h
@@ -8,7 +8,9 @@
#else
# include <errno.h>
#endif
-#include <source_location>
+#if __has_include("source_location")
+# include <source_location>
+#endif
#include <string>
#include <system_error>
@@ -20,7 +22,7 @@ ZENCORE_API void ThrowSystemException [[noreturn]] (HRESULT hRes, std::string_vi
ZENCORE_API void ThrowLastError [[noreturn]] (std::string_view Message);
-#if __cpp_lib_source_location
+#if defined(__cpp_lib_source_location)
ZENCORE_API void ThrowLastError [[noreturn]] (std::string_view Message, const std::source_location& Location);
#endif