Commit 2d6581a394685ab794152196299610045af31cc7

Authored by Henry Schreiner
1 parent ef1aa10f

Boost Optional before 1.58 is too buggy to support

CHANGELOG.md
  1 +### Version 1.5.3: Compiler compatibility
  2 +This version fixes older AppleClang compilers by removing the optimization for casting. The minimum version of Boost Optional supported has been clarified to be 1.58.
  3 +
1 4 ### Version 1.5.2: LICENSE in single header mode
2 5  
3 6 This is a quick patch release that makes LICENSE part of the single header file, making it easier to include. Minor cleanup from codacy. No significant code changes from 1.5.1.
... ...
include/CLI/Optional.hpp
... ... @@ -21,8 +21,11 @@
21 21 #endif
22 22  
23 23 #if __has_include(<boost/optional.hpp>) && !defined(CLI11_BOOST_OPTIONAL)
  24 +#include <boost/version.hpp>
  25 +#if BOOST_VERSION >= 105800
24 26 #define CLI11_BOOST_OPTIONAL
25 27 #endif
  28 +#endif
26 29  
27 30 #endif
28 31  
... ...
tests/CMakeLists.txt
... ... @@ -72,7 +72,7 @@ file(WRITE &quot;${PROJECT_BINARY_DIR}/CTestCustom.cmake&quot;
72 72 )
73 73  
74 74 # Add boost to test boost::optional if available
75   -find_package(Boost 1.35)
  75 +find_package(Boost 1.58)
76 76 if(Boost_FOUND)
77 77 target_link_libraries(informational PUBLIC Boost::boost)
78 78 target_link_libraries(OptionalTest PUBLIC Boost::boost)
... ...