From e1ac68f52683fe87d856c8bc893d350da1be5d65 Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Mon, 20 Apr 2009 14:57:57 +0000 Subject: [PATCH] Trying to fix ambiguities of operator<<() for unused_type. [SVN r52511] --- include/boost/fusion/support/unused.hpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/include/boost/fusion/support/unused.hpp b/include/boost/fusion/support/unused.hpp index b55fb2d1..c62b738a 100644 --- a/include/boost/fusion/support/unused.hpp +++ b/include/boost/fusion/support/unused.hpp @@ -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 boost { namespace fusion -{ - using ::fusion_adl_barrier::unused_type; - using ::fusion_adl_barrier::unused; + namespace detail + { + struct unused_only + { + unused_only(unused_type const&) {} + }; + } template - inline Out& operator<<(Out& out, unused_type const&) + inline Out& operator<<(Out& out, detail::unused_only const&) { return out; } - template - inline Out& operator>>(Out& out, unused_type&) + template + inline In& operator>>(In& in, unused_type&) { - return out; + return in; } }}