Hello. When trying to build a project, I get the following error:
/root/drogon/lib/src/Cookie.cc:33:17: error: ‘const class boost::optional’ has no member named ‘hasvalue’; did you mean ‘value’?
if (maxAge.has_value())
Based on the lib/inc/drogon/utils/optional.h, it turns out that if the compiler does not support C++17, then boost::optional is used. But there is actually no has_value() method, unlike std::optional.
It turns out that the next branch will never work correctly:
#else
const boost::none_t null ptr = boost::none;
using boost::optional;
Do I understand correctly that at the moment the minimum requirements are support for C++17?
Boost Release 1.68
Added member function has_value() for compatibility with std::optional (issue #52).
Added member function map() for transforming optional into optional using a function of type T -> U.
Added member function flat_map() for transforming optional into optional using a function of type T -> optonal.
you should upgrade your boost version to 1.68 or newer
Hello. When trying to build a project, I get the following error: /root/drogon/lib/src/Cookie.cc:33:17: error: ‘const class boost::optional’ has no member named ‘hasvalue’; did you mean ‘value’?
if (maxAge.has_value())
Based on the lib/inc/drogon/utils/optional.h, it turns out that if the compiler does not support C++17, then boost::optional is used. But there is actually no has_value() method, unlike std::optional.
It turns out that the next branch will never work correctly:
Do I understand correctly that at the moment the minimum requirements are support for C++17?