diff --git a/include/boost/optional/optional.hpp b/include/boost/optional/optional.hpp index 5d5870b..7c65962 100644 --- a/include/boost/optional/optional.hpp +++ b/include/boost/optional/optional.hpp @@ -17,6 +17,7 @@ #include #include +#include #include #include @@ -743,6 +744,11 @@ get_pointer ( optional& opt ) return opt.get_ptr() ; } +// Forward declaration to prevent operator safe-bool from being used. +template +std::basic_ostream& +operator<<(std::basic_ostream& out, optional const& v); + // optional's relational operators ( ==, !=, <, >, <=, >= ) have deep-semantics (compare values). // WARNING: This is UNLIKE pointers. Use equal_pointees()/less_pointess() in generic code instead.