diff --git a/include/CLI/Optional.hpp b/include/CLI/Optional.hpp index faaee366..b1084657 100644 --- a/include/CLI/Optional.hpp +++ b/include/CLI/Optional.hpp @@ -10,13 +10,16 @@ // [CLI11:verbatim] #ifdef __has_include +// You can explicitly enable or disable support +// by defining these to 1 or 0. #if defined(CLI11_CPP17) && __has_include() && \ !defined(CLI11_STD_OPTIONAL) #define CLI11_STD_OPTIONAL 1 #endif #if defined(CLI11_CPP14) && __has_include() && \ - !defined(CLI11_EXPERIMENTAL_OPTIONAL) + !defined(CLI11_EXPERIMENTAL_OPTIONAL) \ + && (!defined(CLI11_STD_OPTIONAL) || CLI11_STD_OPTIONAL != 0) #define CLI11_EXPERIMENTAL_OPTIONAL 1 #endif