summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Szmigin <smidge@xsco.net>2020-08-21 13:33:10 +0100
committerAdam Szmigin <smidge@xsco.net>2020-08-21 13:33:10 +0100
commit45da6ecbb7d1c2e46af1e937120a8f55cfa2f59d (patch)
treecef26047c818820db0a638cb933d25bbeb84aaad
parentf14366864b6d66fc69741141acbb4e66b88d9854 (diff)
Fix aliasing of `std::experimental::optional<T>`
-rw-r--r--include/djinterop/optional.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/djinterop/optional.hpp b/include/djinterop/optional.hpp
index 6795913..baf4773 100644
--- a/include/djinterop/optional.hpp
+++ b/include/djinterop/optional.hpp
@@ -21,7 +21,7 @@
#include <djinterop/config.hpp>
-#ifdef DJINTEROP_STD_OPTIONAL
+#if defined DJINTEROP_STD_OPTIONAL
#include <optional>
@@ -39,7 +39,8 @@ using std::optional;
} // namespace stdx
} // namespace djinterop
-#elif DJINTEROP_STD_EXPERIMENTAL_OPTIONAL
+#elif defined DJINTEROP_STD_EXPERIMENTAL_OPTIONAL
+
#include <experimental/optional>
namespace djinterop
@@ -57,7 +58,9 @@ using std::experimental::optional;
} // namespace djinterop
#else
+
#error This library requires support for optional<T>, but none was found
+
#endif
#endif // DJINTEROP_OPTIONAL_HPP