boost.fusion compile error using VC 8: error C2039: 'tag_of' : is not a member of 'boost::fusion::traits::detail'
When I compiled the code snippet as follows, there were some errors about searching tag_of in namespace boost::fusion::traits::detail. But after reviewing the source code, I found the desired tag_of was actually located in namespace boost::fusion::detail. Moreover it will be compiled successfully if adding this full and correct namespace before tag_of in the file <is_sequence.hpp>. Here is code snippet: typedef fusion::vector< int, string > TPerson; TPerson person( 20, "Alan" ); cout << person << endl; Here are compile errors: 1>d:\libraries\boost_1_39_0\boost\fusion\support\is_sequence.hpp(59) : error C2039: 'tag_of' : is not a member of 'boost::fusion::traits::detail' 1> d:\libraries\boost_1_39_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=TPerson 1> ] 1> d:\samples\boost\fusion\fusion.cpp(28) : see reference to class template instantiation 'boost::enable_if<Cond,T>' being compiled 1> with 1> [ 1> Cond=boost::fusion::traits::is_sequence<TPerson>, 1> T=std::ostream & 1> ] Here is the origin code in <is_sequence.hpp>: namespace traits { template <typename T> struct is_sequence : extension::is_sequence_impl<typename detail::tag_of<T>::type>:: template apply<T> {}; } Here is the modification: namespace traits { template <typename T> struct is_sequence : extension::is_sequence_impl<typename boost::fusion::detail::tag_of<T>::type>:: template apply<T> {}; } I guess this should be a minor bug in boost.fusion.
Tang Jiangjun wrote:
When I compiled the code snippet as follows, there were some errors about searching tag_of in namespace boost::fusion::traits::detail. But after reviewing the source code, I found the desired tag_of was actually located in namespace boost::fusion::detail. Moreover it will be compiled successfully if adding this full and correct namespace before tag_of in the file <is_sequence.hpp>.
Hi Tang, Could you please add a Trac ticket for this? Thanks! I'll deal with it asap. Just so that I won't forget. Regards, -- Joel de Guzman http://www.boostpro.com http://spirit.sf.net
Hello Joel, I've already added it. The number is #3175. All the best, Tang Jiang Jun On Mon, Jun 29, 2009 at 7:19 AM, Joel de Guzman <joel@boost-consulting.com>wrote:
Tang Jiangjun wrote:
When I compiled the code snippet as follows, there were some errors about searching tag_of in namespace boost::fusion::traits::detail. But after reviewing the source code, I found the desired tag_of was actually located in namespace boost::fusion::detail. Moreover it will be compiled successfully if adding this full and correct namespace before tag_of in the file <is_sequence.hpp>.
Hi Tang,
Could you please add a Trac ticket for this? Thanks! I'll deal with it asap. Just so that I won't forget.
Regards, -- Joel de Guzman http://www.boostpro.com http://spirit.sf.net
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Joel de Guzman
-
Tang Jiangjun