diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f4d59c..fafee7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### Version 1.5.3: Compiler compatibility +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. + ### Version 1.5.2: LICENSE in single header mode 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. diff --git a/include/CLI/Optional.hpp b/include/CLI/Optional.hpp index 04f710b..88044e9 100644 --- a/include/CLI/Optional.hpp +++ b/include/CLI/Optional.hpp @@ -21,8 +21,11 @@ #endif #if __has_include() && !defined(CLI11_BOOST_OPTIONAL) +#include +#if BOOST_VERSION >= 105800 #define CLI11_BOOST_OPTIONAL #endif +#endif #endif diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4c191fc..bb592ab 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -72,7 +72,7 @@ file(WRITE "${PROJECT_BINARY_DIR}/CTestCustom.cmake" ) # Add boost to test boost::optional if available -find_package(Boost 1.35) +find_package(Boost 1.58) if(Boost_FOUND) target_link_libraries(informational PUBLIC Boost::boost) target_link_libraries(OptionalTest PUBLIC Boost::boost)