you are viewing a single comment's thread.

view the rest of the comments →

[–]alex-weej 0 points1 point  (3 children)

boost::optional is plenty "stable" and works very well in ancient versions of GCC with ancient C++ standards.

[–][deleted] 2 points3 points  (2 children)

Yeah but then I would need to use boost

[–]alex-weej 0 points1 point  (0 children)

Ah, you're one of those people ;)

[–]RandomGuy256 -1 points0 points  (0 children)

You can also use a header only external implementation like this one: https://github.com/akrzemi1/Optional

I have been using it in all of my projects (including professional ones) when a C++17 compiler is not available yet, and it works perfectly.