...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
#include <istream> #include <ostream> #include <boost/optional/optional.hpp> namespace boost { template <class CharType, class CharTrait, class T> std::basic_ostream<CharType, CharTrait>& operator<<(std::basic_ostream<CharType, CharTrait>& out, optional<T> const& v); template <class CharType, class CharTrait> std::basic_ostream<CharType, CharTrait>& operator<<(std::basic_ostream<CharType, CharTrait>& out, none_t const&); template<class CharType, class CharTrait, class T> std::basic_istream<CharType, CharTrait>& operator>>(std::basic_istream<CharType, CharTrait>& in, optional<T>& v); } // namespace boost