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 detail
{
// class template identifier ---------------------------------------------//
// Always used as a base class so that different instantiations result in
@@ -55,32 +57,33 @@ namespace boost
identifier() {}
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:
#endif
#endif
T m_value;
};
#ifndef BOOST_NO_SFINAE
//#ifndef BOOST_NO_SFINAE
template <class Ostream, class Id>
typename enable_if< is_base_of< identifier< typename Id::value_type, Id >, Id >,
Ostream & >::type operator<<( Ostream & os, const Id & id )
{
return os << id.value();
}
// template <class Ostream, class Id>
// typename enable_if< is_base_of< identifier< typename Id::value_type, Id >, Id >,
// Ostream & >::type operator<<( Ostream & os, const Id & id )
// {
// return os << id.value();
// }
template <class Istream, class Id>
typename enable_if< is_base_of< identifier< typename Id::value_type, Id >, Id >,
Istream & >::type operator>>( Istream & is, Id & id )
{
typename Id::value_type v;
is >> v;
id.value( v );
return is;
}
#endif
// template <class Istream, class Id>
// typename enable_if< is_base_of< identifier< typename Id::value_type, Id >, Id >,
// Istream & >::type operator>>( Istream & is, Id & id )
// {
// typename Id::value_type v;
// is >> v;
// id.value( v );
// return is;
// }
//#endif
} // namespace detail
} // namespace boost
#endif // BOOST_IDENTIFIER_HPP