Trying to fix ambiguities of operator<<() for unused_type.

[SVN r52511]
This commit is contained in:
Hartmut Kaiser
2009-04-20 14:57:57 +00:00
parent 9acd9b2feb
commit e1ac68f526

View File

@ -15,7 +15,7 @@
#define BOOST_FUSION_UNUSED_HAS_IO
namespace fusion_adl_barrier
namespace boost { namespace fusion
{
struct unused_type
{
@ -56,23 +56,25 @@ namespace fusion_adl_barrier
};
unused_type const unused = unused_type();
namespace detail
{
struct unused_only
{
unused_only(unused_type const&) {}
};
}
namespace boost { namespace fusion
{
using ::fusion_adl_barrier::unused_type;
using ::fusion_adl_barrier::unused;
template <typename Out>
inline Out& operator<<(Out& out, unused_type const&)
inline Out& operator<<(Out& out, detail::unused_only const&)
{
return out;
}
template <typename Out>
inline Out& operator>>(Out& out, unused_type&)
template <typename In>
inline In& operator>>(In& in, unused_type&)
{
return out;
return in;
}
}}