#include </usr/include/boost/optional.hpp> #include <iostream> using namespace std; boost::optional<int> test_func(int i)
When trying to get the value of a boost::optional object, BOOST_ASSERT is used to make sure the object is indeed initialized.