Update of /cvsroot/boost/boost/boost/fusion/support
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29614/support

Modified Files:
        tag_of.hpp 
Log Message:
fixes ambiguity in tag_of specialization


Index: tag_of.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/fusion/support/tag_of.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- tag_of.hpp  2 Mar 2007 10:44:14 -0000       1.6
+++ tag_of.hpp  22 Mar 2007 19:21:29 -0000      1.7
@@ -12,7 +12,9 @@
 #include <boost/fusion/support/detail/is_mpl_sequence.hpp>
 #include <boost/mpl/has_xxx.hpp>
 #include <boost/utility/enable_if.hpp>
+#include <boost/mpl/identity.hpp>
 #include <boost/mpl/bool.hpp>
+#include <boost/mpl/if.hpp>
 #include <utility>
 
 namespace boost
@@ -38,6 +40,7 @@
 namespace boost { namespace fusion
 {
     struct non_fusion_tag;
+    struct mpl_sequence_tag;
 
     namespace detail
     {
@@ -48,9 +51,10 @@
     {
         template <typename Sequence, typename Active>
         struct tag_of
-        {
-            typedef non_fusion_tag type;
-        };
+          : mpl::if_< detail::is_mpl_sequence<Sequence>,
+              mpl::identity<mpl_sequence_tag>,
+              mpl::identity<non_fusion_tag> >::type
+        { };
 
         template <typename Sequence>
         struct tag_of<Sequence, typename 
boost::enable_if<detail::has_fusion_tag<Sequence> >::type>
@@ -73,9 +77,6 @@
         template <typename T, std::size_t N>
         struct tag_of<boost::array<T, N> >;
 
-        template <typename Sequence>
-        struct tag_of<Sequence, typename 
boost::enable_if<detail::is_mpl_sequence<Sequence> >::type>;
-
         template<typename T1, typename T2>
         struct tag_of<std::pair<T1, T2> >;
     }


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to