boost::optional alternative in C++ Standard Library

前端 未结 3 421

I\'m trying to get my program working without boost usage, but can\'t find an alternative of some useful patterns. Namely, I can\'t find boost::optional

3条回答
  •  攒了一身酷
    2021-01-01 13:36

    Like pmr explained, it is not possible right now, and will not be until C++17 is out.

    However, you should be able to use this single header library on github as a drop in replacement of boost- or std optional. It has no dependencies (except a c++11/c++14 capable compiler).

提交回复
热议问题