aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-11-22 14:48:56 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-11-22 14:48:56 +0200
commit44a0006e0d5fea9b2420f7c3289b5e75ccac9cb0 (patch)
tree01e7380d23ed82df9c00d2964a57cf4e5cc61a92
parenta5cd8c15a9a44858d91bbadbaed30173e79f9a5a (diff)
Fix <optional> availability detection for Mac OS
It still has it in <experimental/optional>.
-rw-r--r--libbutl/optional.mxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/libbutl/optional.mxx b/libbutl/optional.mxx
index 33ee3d3..4f34a78 100644
--- a/libbutl/optional.mxx
+++ b/libbutl/optional.mxx
@@ -30,10 +30,12 @@
// the latter we will check for the presence of the <optional> header which
// only appeared in GCC 7. Also assume both are only available in C++17.
//
+ // Note that on Mac OS it can still be <experimental/optional>.
+ //
# if __cplusplus >= 201703L
# if __has_include(<__config>)
# include <__config> // _LIBCPP_VERSION
-# if _LIBCPP_VERSION >= 4000
+# if _LIBCPP_VERSION >= 4000 && __has_include(<optional>)
# define LIBBUTL_STD_OPTIONAL
# endif
# elif __has_include(<optional>)