diff --git a/include/boost/fusion/support/tag_of.hpp b/include/boost/fusion/support/tag_of.hpp index 1c5a26e5..a3fef3ba 100644 --- a/include/boost/fusion/support/tag_of.hpp +++ b/include/boost/fusion/support/tag_of.hpp @@ -46,28 +46,29 @@ namespace boost { namespace fusion namespace detail { BOOST_MPL_HAS_XXX_TRAIT_DEF(fusion_tag) + + template + struct tag_of_impl + : mpl::if_, + mpl::identity, + mpl::identity >::type + {}; + + template + struct tag_of_impl< + Sequence + , typename boost::enable_if >::type> + { + typedef typename Sequence::fusion_tag type; + }; } namespace traits { - template - struct tag_of_fallback - { - typedef non_fusion_tag type; - }; - template struct tag_of - : mpl::if_< fusion::detail::is_mpl_sequence, - mpl::identity, - tag_of_fallback >::type + : boost::fusion::detail::tag_of_impl {}; - - template - struct tag_of >::type> - { - typedef typename Sequence::fusion_tag type; - }; } namespace detail diff --git a/include/boost/fusion/support/tag_of_fwd.hpp b/include/boost/fusion/support/tag_of_fwd.hpp index dfc0e01c..ba434d93 100644 --- a/include/boost/fusion/support/tag_of_fwd.hpp +++ b/include/boost/fusion/support/tag_of_fwd.hpp @@ -12,9 +12,6 @@ namespace boost { namespace fusion { namespace traits { - template - struct tag_of_fallback; - template struct tag_of; }