Commit 2d6581a394685ab794152196299610045af31cc7
1 parent
ef1aa10f
Boost Optional before 1.58 is too buggy to support
Showing
3 changed files
with
7 additions
and
1 deletions
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 | ### Version 1.5.2: LICENSE in single header mode | 4 | ### Version 1.5.2: LICENSE in single header mode |
| 2 | 5 | ||
| 3 | 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. | 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,8 +21,11 @@ | ||
| 21 | #endif | 21 | #endif |
| 22 | 22 | ||
| 23 | #if __has_include(<boost/optional.hpp>) && !defined(CLI11_BOOST_OPTIONAL) | 23 | #if __has_include(<boost/optional.hpp>) && !defined(CLI11_BOOST_OPTIONAL) |
| 24 | +#include <boost/version.hpp> | ||
| 25 | +#if BOOST_VERSION >= 105800 | ||
| 24 | #define CLI11_BOOST_OPTIONAL | 26 | #define CLI11_BOOST_OPTIONAL |
| 25 | #endif | 27 | #endif |
| 28 | +#endif | ||
| 26 | 29 | ||
| 27 | #endif | 30 | #endif |
| 28 | 31 |
tests/CMakeLists.txt
| @@ -72,7 +72,7 @@ file(WRITE "${PROJECT_BINARY_DIR}/CTestCustom.cmake" | @@ -72,7 +72,7 @@ file(WRITE "${PROJECT_BINARY_DIR}/CTestCustom.cmake" | ||
| 72 | ) | 72 | ) |
| 73 | 73 | ||
| 74 | # Add boost to test boost::optional if available | 74 | # Add boost to test boost::optional if available |
| 75 | -find_package(Boost 1.35) | 75 | +find_package(Boost 1.58) |
| 76 | if(Boost_FOUND) | 76 | if(Boost_FOUND) |
| 77 | target_link_libraries(informational PUBLIC Boost::boost) | 77 | target_link_libraries(informational PUBLIC Boost::boost) |
| 78 | target_link_libraries(OptionalTest PUBLIC Boost::boost) | 78 | target_link_libraries(OptionalTest PUBLIC Boost::boost) |