<div dir="ltr"><div>Hello,</div> <div> </div> <div>I've just noticed that the following code might be missleading:</div> <div> </div> <div>boost::optional<int> opt;</div> <div>opt = 0;</div> <div>std::cout << opt;</div> <div> </div> <div>If boost/optional/optional_io.hpp is not included, the above code outputs "1" - because boost::optional is implicitly convertible to bool.</div> <div>Maybe it's worth either including boost/optional/optional_io.hpp in boost/optional.hpp or making some trick to generate compiler error if operator <<() used and optional_io.hpp is not included?</div> <div> </div></div>