Include boost/optional/optional_io.hpp in boost/optional.hpp

optional_io.hpp is required to prevent unresolved symbol errors for operator<<(ostream&, optional<T> const&)