Opened 13 years ago

Closed 12 years ago

#3175 closed Bugs (fixed)

compilation error about fusion::traits::tag_of using msvc 8.0

Reported by: Tang Jiang Jun <tangjiangjun@…> Owned by: Joel de Guzman
Milestone: Boost 1.40.0 Component: fusion
Version: Boost 1.39.0 Severity: Problem
Keywords: tag_of is_sequence Cc:

Description

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.

Change History (1)

comment:1 by Steven Watanabe, 12 years ago

Resolution: fixed
Status: newclosed

This has been fixed.

Note: See TracTickets for help on using tickets.