--- boost/optional/optional_fwd.hpp.orig 2008-07-10 19:24:47.307077000 +0900 +++ boost/optional/optional_fwd.hpp 2008-07-10 20:50:37.941812000 +0900 @@ -12,10 +12,28 @@ #ifndef BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP #define BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP +#include + namespace boost { template class optional ; +// TODO: Add BOOST_NO_TEMPLATED_STREAMS to config framework and change +// this and other libraries that use BOOST_NO_TEMPLATED_STREAMS. +#if defined __GNUC__ +# if (__GNUC__ == 2 && __GNUC_MINOR__ <= 97) +# define BOOST_OPTIONAL_NO_TEMPLATED_STREAMS +# endif +#endif // __GNUC__ + +#if defined (BOOST_OPTIONAL_NO_TEMPLATED_STREAMS) +std::ostream& operator<<(std::ostream& out, optional const& v); +#else +template +std::basic_ostream& +operator<<(std::basic_ostream& out, optional const& v); +#endif + } // namespace boost #endif --- boost/optional/optional_io.hpp.orig 2008-07-10 19:24:56.129862000 +0900 +++ boost/optional/optional_io.hpp 2008-07-10 20:45:53.944973000 +0900 @@ -12,12 +12,6 @@ #ifndef BOOST_OPTIONAL_OPTIONAL_IO_FLC_19NOV2002_HPP #define BOOST_OPTIONAL_OPTIONAL_IO_FLC_19NOV2002_HPP -#if defined __GNUC__ -# if (__GNUC__ == 2 && __GNUC_MINOR__ <= 97) -# define BOOST_OPTIONAL_NO_TEMPLATED_STREAMS -# endif -#endif // __GNUC__ - #if defined BOOST_OPTIONAL_NO_TEMPLATED_STREAMS # include #else @@ -32,7 +26,7 @@ namespace boost { -#if defined (BOOST_NO_TEMPLATED_STREAMS) +#if defined (BOOST_OPTIONAL_NO_TEMPLATED_STREAMS) template inline std::ostream& operator<<(std::ostream& out, optional const& v) #else @@ -52,7 +46,7 @@ return out; } -#if defined (BOOST_NO_TEMPLATED_STREAMS) +#if defined (BOOST_OPTIONAL_NO_TEMPLATED_STREAMS) template inline std::istream& operator>>(std::istream& in, optional& v) #else