[Boost-bugs] [Boost C++ Libraries] #3175: compilation error about fusion::traits::tag_of using msvc 8.0

Subject: [Boost-bugs] [Boost C++ Libraries] #3175: compilation error about fusion::traits::tag_of using msvc 8.0
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-06-15 09:22:41


#3175: compilation error about fusion::traits::tag_of using msvc 8.0
-----------------------------------------------------+----------------------
 Reporter: Tang Jiang Jun <tangjiangjun_at_[hidden]> | Owner: djowel
     Type: Bugs | Status: new
Milestone: Boost 1.40.0 | Component: fusion
  Version: Boost 1.39.0 | Severity: Problem
 Keywords: tag_of is_sequence |
-----------------------------------------------------+----------------------
 I met a compilation error about matching the proper tag_of metafunction.
 The code snippet is shown as follow.

 #include <boost/fusion/support.hpp>
 #include <boost/fusion/container.hpp>
 #include <boost/fusion/sequence.hpp>
 #include <boost/fusion/algorithm.hpp>

 #include <string>
 #include <iostream>

 using namespace std;
 using namespace boost;

 int _tmain(int argc, _TCHAR* argv[])
 {
         typedef fusion::vector< int, char, string > VecTuple;
         VecTuple stuff( 1, 'a', "Hello, fusion!" );

         cout << stuff << endl;
         return 0;
 }

 The error message is:
 1>e:\libraries\boost_1_37_0\boost\fusion\support\is_sequence.hpp(59) :
 error C2039: 'tag_of' : is not a member of 'boost::fusion::traits::detail'
 1> e:\libraries\boost_1_37_0\boost\utility\enable_if.hpp(36) : see
 reference to class template instantiation
 'boost::fusion::traits::is_sequence<T>' being compiled
 1> with
 1> [
 1> T=VecTuple
 1> ]
 1> e:\samples\boost\fusion\fusion.cpp(52) : see reference to class
 template instantiation 'boost::enable_if<Cond,T>' being compiled
 1> with
 1> [
 1> Cond=boost::fusion::traits::is_sequence<VecTuple>,
 1> T=std::ostream &
 1> ]

 I found that if adding the full namespace 'boost::fusion' before
 '::detail::tag_of' in the file 'is_sequence.hpp', everything will be OK.
 So I think that maybe is a namespace lookup error in msvc.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3175>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:00 UTC