
AMDG Boost.Random uses BOOST_NO_MEMBER_TEMPLATE_FRIENDS to decide whether it is safe to define the stream operators. #if !defined(BOOST_NO_OPERATORS_IN_NAMESPACE) && !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) template<class CharT, class Traits> friend std::basic_ostream<CharT,Traits>& operator<<(std::basic_ostream<CharT,Traits>& os, const uniform_int& ud); template<class CharT, class Traits> friend std::basic_istream<CharT,Traits>& operator>>(std::basic_istream<CharT,Traits>& is, uniform_int& ud); #endif However, the documentation of BOOST_NO_MEMBER_TEMPLATE_FRIENDS says that BOOST_NO_MEMBER_TEMPLATE_FRIENDS is defined if the compiler doesn't support template<class P> friend class frd; It seems from https://svn.boost.org/trac/boost/ticket/1068 that these do not correspond exactly. Are there any compilers that we still care about, that don't support this use of friend? Also, it sounds to me like the use of BOOST_NO_OPERATORS_IN_NAMESPACE is wrong because it is documented as "Compiler requires inherited operator friend functions to be defined at namespace scope" and there is no inheritance here. Is this right? In Christ, Steven Watanabe