mirror of
https://github.com/boostorg/detail.git
synced 2025-08-05 15:24:26 +02:00
move to namespace detail
[SVN r36027]
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
#include <iosfwd>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
// class template identifier ---------------------------------------------//
|
||||
|
||||
@@ -61,26 +63,27 @@ namespace boost
|
||||
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
|
||||
|
Reference in New Issue
Block a user