简体   繁体   中英

What is the boost equivalent to std::optional nullopt?

I've imported some code pieces from a third party project into my C++11 project. The third party project uses optional-lite [1], though I'm using Boost heavily in the project and want to keep dependency on other libraries low.

There is boost::optional , but unlike the c++17 counterpart it does not have nullopt .

What's the Boost equivalent to nullopt ?

(Note: Boost version is 1.69)

[1] https://github.com/martinmoene/optional-lite

The equivalent is boost::none . See optional(none_t) .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM