304a305,329 > > // bool_testable contributed by Sam Partington -----------------------------// > > template > struct bool_testable : B > { > private: > struct safe_bool > { > #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS > private: > template friend class bool_testable; > #endif > int x; > typedef int safe_bool::*type; > }; > public: > typedef safe_bool::type unspecified_bool_type; > operator unspecified_bool_type() const > { > return !static_cast(*this) ? 0 : &safe_bool::x; > } > }; > >