move to namespace detail

[SVN r36027]
This commit is contained in:
Beman Dawes
2006-11-13 22:10:57 +00:00
parent a548ecc968
commit 87ff652a07

View File

@@ -16,6 +16,8 @@
namespace boost namespace boost
{ {
namespace detail
{
// class template identifier ---------------------------------------------// // class template identifier ---------------------------------------------//
// Always used as a base class so that different instantiations result in // Always used as a base class so that different instantiations result in
@@ -55,32 +57,33 @@ namespace boost
identifier() {} identifier() {}
explicit identifier( value_type v ) : m_value(v) {} explicit identifier( value_type v ) : m_value(v) {}
#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 // 1300 == VC++ 7.0 bug workaround #if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 // 1300 == VC++ 7.0 bug workaround
private: private:
#endif #endif
T m_value; T m_value;
}; };
#ifndef BOOST_NO_SFINAE //#ifndef BOOST_NO_SFINAE
template <class Ostream, class Id> // template <class Ostream, class Id>
typename enable_if< is_base_of< identifier< typename Id::value_type, Id >, Id >, // typename enable_if< is_base_of< identifier< typename Id::value_type, Id >, Id >,
Ostream & >::type operator<<( Ostream & os, const Id & id ) // Ostream & >::type operator<<( Ostream & os, const Id & id )
{ // {
return os << id.value(); // return os << id.value();
} // }
template <class Istream, class Id> // template <class Istream, class Id>
typename enable_if< is_base_of< identifier< typename Id::value_type, Id >, Id >, // typename enable_if< is_base_of< identifier< typename Id::value_type, Id >, Id >,
Istream & >::type operator>>( Istream & is, Id & id ) // Istream & >::type operator>>( Istream & is, Id & id )
{ // {
typename Id::value_type v; // typename Id::value_type v;
is >> v; // is >> v;
id.value( v ); // id.value( v );
return is; // return is;
} // }
#endif //#endif
} // namespace detail
} // namespace boost } // namespace boost
#endif // BOOST_IDENTIFIER_HPP #endif // BOOST_IDENTIFIER_HPP