Commit e6f508dc14a1cd1daf1dbb37b27b6f6464346b5f

Authored by Henry Fredrick Schreiner
1 parent 27cb792c

Fix for redefinition warning

Showing 1 changed file with 6 additions and 0 deletions
include/CLI/Optional.hpp
... ... @@ -12,18 +12,24 @@
12 12 #if defined(CLI11_CPP17) && __has_include(<optional>)
13 13 #include <optional>
14 14 #ifdef __cpp_lib_optional
  15 +#ifndef CLI11_STD_OPTIONAL
15 16 #define CLI11_STD_OPTIONAL
16 17 #endif
17 18 #endif
  19 +#endif
18 20 #if defined(CLI11_CPP14) && __has_include(<experimental/optional>)
19 21 #include <experimental/optional>
  22 +#ifndef CLI11_EXPERIMENTAL_OPTIONAL
20 23 #define CLI11_EXPERIMENTAL_OPTIONAL
21 24 #endif
  25 +#endif
22 26 #if __has_include(<boost/optional.hpp>)
23 27 #include <boost/optional.hpp>
  28 +#ifndef CLI11_BOOST_OPTIONAL
24 29 #define CLI11_BOOST_OPTIONAL
25 30 #endif
26 31 #endif
  32 +#endif
27 33 // [CLI11:verbatim]
28 34  
29 35 namespace CLI {
... ...