[fusion] fusion::map broken for Visual Studio 2005?

Attached is a simple repro (taken directly from the fusion::map documentation example). It fails to compile on Visual Studio 2005 using CVS HEAD from today the message below. Fusion::map solves a current problem I have rather elegantly but this is an obvious showstopper. Any ideas? Thanks, Michael Marcin 1>c:\subversion\boost-head\boost\boost\fusion\sequence\intrinsic\at.hpp(60) : error C2504: 'boost::fusion::extension::at_impl<Tag>::apply<Sequence,N>' : base class undefined 1> with 1> [ 1> Tag=boost::fusion::map_tag 1> ] 1> and 1> [ 1> Sequence=const map_type, 1> N=int 1> ] 1> c:\code\publishsubscribe\main.cpp(73) : see reference to class template instantiation 'boost::fusion::result_of::at<Sequence,N>' being compiled 1> with 1> [ 1> Sequence=const map_type, 1> N=int 1> ] 1>c:\subversion\boost-head\boost\boost\fusion\sequence\intrinsic\at.hpp(60) : error C2504: 'boost::fusion::extension::at_impl<Tag>::apply<Sequence,N>' : base class undefined 1> with 1> [ 1> Tag=boost::fusion::map_tag 1> ] 1> and 1> [ 1> Sequence=map_type, 1> N=int 1> ] 1> c:\subversion\boost-head\boost\boost\utility\enable_if.hpp(63) : see reference to class template instantiation 'boost::fusion::result_of::at<Sequence,N>' being compiled 1> with 1> [ 1> Sequence=map_type, 1> N=int 1> ] 1> c:\subversion\boost-head\boost\boost\utility\enable_if.hpp(70) : see reference to class template instantiation 'boost::lazy_disable_if_c<B,T>' being compiled 1> with 1> [ 1> B=false, 1> T=boost::fusion::result_of::at<map_type,int> 1> ] 1> c:\code\publishsubscribe\main.cpp(73) : see reference to class template instantiation 'boost::lazy_disable_if<Cond,T>' being compiled 1> with 1> [ 1> Cond=boost::is_const<map_type>, 1> T=boost::fusion::result_of::at<map_type,int> 1> ] 1>c:\subversion\boost-head\boost\boost\utility\enable_if.hpp(63) : error C2039: 'type' : is not a member of 'boost::fusion::result_of::at<Sequence,N>' 1> with 1> [ 1> Sequence=map_type, 1> N=int 1> ] 1>c:\subversion\boost-head\boost\boost\utility\enable_if.hpp(63) : error C2146: syntax error : missing ';' before identifier 'type' 1>c:\subversion\boost-head\boost\boost\utility\enable_if.hpp(63) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\subversion\boost-head\boost\boost\utility\enable_if.hpp(63) : error C2602: 'boost::lazy_disable_if_c<B,T>::type' is not a member of a base class of 'boost::lazy_disable_if_c<B,T>' 1> with 1> [ 1> B=false, 1> T=boost::fusion::result_of::at<map_type,int> 1> ] 1> c:\subversion\boost-head\boost\boost\utility\enable_if.hpp(63) : see declaration of 'boost::lazy_disable_if_c<B,T>::type' 1> with 1> [ 1> B=false, 1> T=boost::fusion::result_of::at<map_type,int> 1> ] 1>c:\subversion\boost-head\boost\boost\utility\enable_if.hpp(63) : error C2868: 'boost::lazy_disable_if_c<B,T>::type' : illegal syntax for using-declaration; expected qualified-name 1> with 1> [ 1> B=false, 1> T=boost::fusion::result_of::at<map_type,int> 1> ] 1>c:\subversion\boost-head\boost\boost\fusion\sequence\intrinsic\at.hpp(60) : error C2504: 'boost::fusion::extension::at_impl<Tag>::apply<Sequence,N>' : base class undefined 1> with 1> [ 1> Tag=boost::fusion::map_tag 1> ] 1> and 1> [ 1> Sequence=const map_type, 1> N=double 1> ] 1> c:\code\publishsubscribe\main.cpp(74) : see reference to class template instantiation 'boost::fusion::result_of::at<Sequence,N>' being compiled 1> with 1> [ 1> Sequence=const map_type, 1> N=double 1> ] 1>c:\subversion\boost-head\boost\boost\fusion\sequence\intrinsic\at.hpp(60) : error C2504: 'boost::fusion::extension::at_impl<Tag>::apply<Sequence,N>' : base class undefined 1> with 1> [ 1> Tag=boost::fusion::map_tag 1> ] 1> and 1> [ 1> Sequence=map_type, 1> N=double 1> ] 1> c:\subversion\boost-head\boost\boost\utility\enable_if.hpp(63) : see reference to class template instantiation 'boost::fusion::result_of::at<Sequence,N>' being compiled 1> with 1> [ 1> Sequence=map_type, 1> N=double 1> ] 1> c:\subversion\boost-head\boost\boost\utility\enable_if.hpp(70) : see reference to class template instantiation 'boost::lazy_disable_if_c<B,T>' being compiled 1> with 1> [ 1> B=false, 1> T=boost::fusion::result_of::at<map_type,double> 1> ] 1> c:\code\publishsubscribe\main.cpp(74) : see reference to class template instantiation 'boost::lazy_disable_if<Cond,T>' being compiled 1> with 1> [ 1> Cond=boost::is_const<map_type>, 1> T=boost::fusion::result_of::at<map_type,double> 1> ] 1>c:\subversion\boost-head\boost\boost\utility\enable_if.hpp(63) : error C2039: 'type' : is not a member of 'boost::fusion::result_of::at<Sequence,N>' 1> with 1> [ 1> Sequence=map_type, 1> N=double 1> ] 1>c:\subversion\boost-head\boost\boost\utility\enable_if.hpp(63) : error C2146: syntax error : missing ';' before identifier 'type' 1>c:\subversion\boost-head\boost\boost\utility\enable_if.hpp(63) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\subversion\boost-head\boost\boost\utility\enable_if.hpp(63) : error C2602: 'boost::lazy_disable_if_c<B,T>::type' is not a member of a base class of 'boost::lazy_disable_if_c<B,T>' 1> with 1> [ 1> B=false, 1> T=boost::fusion::result_of::at<map_type,double> 1> ] 1> c:\subversion\boost-head\boost\boost\utility\enable_if.hpp(63) : see declaration of 'boost::lazy_disable_if_c<B,T>::type' 1> with 1> [ 1> B=false, 1> T=boost::fusion::result_of::at<map_type,double> 1> ] 1>c:\subversion\boost-head\boost\boost\utility\enable_if.hpp(63) : error C2868: 'boost::lazy_disable_if_c<B,T>::type' : illegal syntax for using-declaration; expected qualified-name 1> with 1> [ 1> B=false, 1> T=boost::fusion::result_of::at<map_type,double> 1> ] begin 666 fusion_map_test.cpp M(VEN8VQU9&4@/&EO<W1R96%M/@T*#0HC:6YC;'5D92 \8F]O<W0O9G5S:6]N M+W-U<'!O<G0O<&%I<BYH<' ^#0HC:6YC;'5D92 \8F]O<W0O9G5S:6]N+W-E M<75E;F-E+V-O;G1A:6YE<B]M87 N:'!P/@T*(VEN8VQU9&4@/&)O;W-T+V9U M<VEO;B]S97%U96YC92]I;G1R:6YS:6,O870N:'!P/@T*#0IU<VEN9R!N86UE M<W!A8V4@8F]O<W0Z.F9U<VEO;CL-"@T*:6YT(&UA:6XH*0T*>PT*"71Y<&5D M968@;6%P/ T*"0EP86ER/&EN="P@8VAA<CX-"@D)+"!P86ER/&1O=6)L92P@ M<W1D.CIS=')I;F<^(#X@#0H)"6UA<%]T>7!E.PT*#0H);6%P7W1Y<&4@;2@- M"@D);6%K95]P86ER/&EN=#XH)U@G*0T*"0DL(&UA:V5?<&%I<CQD;W5B;&4^ M*")-96XB*2D[#0H-"@ES=&0Z.F-O=70@/#P@870\:6YT/BAM*2 \/"!S=&0Z M.F5N9&P[#0H)<W1D.CIC;W5T(#P\(&%T/&1O=6)L93XH;2D@/#P@<W1D.CIE 7;F1L.PT*#0H)<F5T=7)N(# [#0I]#0H` ` end

Michael Marcin wrote:
Attached is a simple repro (taken directly from the fusion::map documentation example).
Hmm attachment didn't go through too well sending via outlook express and received here via Thunderbird. I've recreated it and pasted it below. Tested and fails with vs2005, vs2005sp1, and vs2003 Thanks, Michael Marcin ----------- #include <iostream> #include <boost/fusion/support/pair.hpp> #include <boost/fusion/sequence/container/map.hpp> #include <boost/fusion/sequence/intrinsic/at.hpp> int main() { using namespace boost::fusion; typedef map< pair<int, char> , pair<double, std::string> > map_type; map_type m( make_pair<int>('X') , make_pair<double>("Men") ); std::cout << at<int>(m) << std::endl; std::cout << at<double>(m) << std::endl; return 0; }

Michael Marcin wrote:
Michael Marcin wrote:
Attached is a simple repro (taken directly from the fusion::map documentation example).
Hmm attachment didn't go through too well sending via outlook express and received here via Thunderbird. I've recreated it and pasted it below. Tested and fails with vs2005, vs2005sp1, and vs2003
Did the way map works at some point get changed from fusion::at to fusion::at_key and the docs are just out of date? The code below seems to work. - Michael Marcin ---------------- #include <iostream> #include <string> #include <boost/fusion/support/pair.hpp> #include <boost/fusion/sequence/container/map.hpp> #include <boost/fusion/sequence/intrinsic/at_key.hpp> int main() { using namespace boost::fusion; typedef map< pair<int, char> , pair<double, std::string> > map_type; map_type m( make_pair<int>('X') , make_pair<double>("Men") ); std::cout << at_key<int>(m) << std::endl; std::cout << at_key<double>(m) << std::endl; return 0; }

--- Michael Marcin wrote:
Did the way map works at some point get changed from fusion::at to fusion::at_key and the docs are just out of date?
Which docs are out of date? I've always been using at_key with fusion::map. Cromwell D. Enage __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

Cromwell Enage wrote:
--- Michael Marcin wrote:
Did the way map works at some point get changed from fusion::at to fusion::at_key and the docs are just out of date?
Which docs are out of date? I've always been using at_key with fusion::map.
The docs at: CVS_HEAD boost/libs/fusion/doc/html/fusion/sequences/containers/map.html and http://spirit.sourceforge.net/dl_more/fusion_v2/libs/fusion/doc/html/fusion/... are out of date at least... although now that I look the usage of fusion::map in the quickstart section uses at_key. - Michael Marcin

I tried to compile the example from Michael on VC7.1 SP2. It gives my an error: test.cpp(19) : error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'boost::fusion::pair<First,Second>::second_type' (or there is no acceptable conversion) with [ First=double, Second=std::string ] Am I missing something here? Maybe a header file? Regards, Christian On 12/22/06, Michael Marcin <mike@mikemarcin.com> wrote:
Cromwell Enage wrote:
--- Michael Marcin wrote:
Did the way map works at some point get changed from fusion::at to fusion::at_key and the docs are just out of date?
Which docs are out of date? I've always been using at_key with fusion::map.
The docs at:
CVS_HEAD boost/libs/fusion/doc/html/fusion/sequences/containers/map.html
and
http://spirit.sourceforge.net/dl_more/fusion_v2/libs/fusion/doc/html/fusion/...
are out of date at least... although now that I look the usage of fusion::map in the quickstart section uses at_key.
- Michael Marcin
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (4)
-
Christian Henning
-
Cromwell Enage
-
Michael Marcin
-
Michael Marcin