|
RE: MSVC++, bind and namespaces: msg#00319lib.boost.user
Hi, FYI, the code below compiles and runs OK on MSVC++7... so you might just be right! Regards, Antoine -----Original Message----- From: Andre Hentz [mailto:ahentz@xxxxxxxxxxx] Sent: November 28, 2002 09:42 To: Boost-Users@xxxxxxxxxxxxxxx Subject: [Boost-Users] MSVC++, bind and namespaces I've just encountered this problem and it looks like a MS bug. Not sure it deserves a Boost workaround but I thought it would be nice to let you know (in case you don't already). Here's the code: #include <boost/bind.hpp> namespace A{ struct c{ void setName(const char*) {} }; } namespace B{ struct c{ void setName(const char*) {} }; } using namespace B; using namespace A; int main() { boost::bind(&A::c::setName, _1, _2); return 0; } It looks legal to me but I'm no expert. GCC compiles with no warnings but MSVC++ 6sp5 gives the error below. boost/bind/mem_fn_vw.hpp(29) : error C2872: 'c' : ambiguous symbol boost/bind.hpp(875) : see reference to class template instantiation 'boost::_mfi::mf1<void ,struct A::c,char const *>' being compiled boost/bind.hpp(886) : see reference to class template instantiation 'boost::_bi::bind_t_generator<void>::implementation<struct boost::_mfi::mf1<void,struct A::c,char const *>,class boost::_bi::list2<class boost::arg<1>,class boost::arg<2> > >' being compiled test.cpp(15) : see reference to class template instantiation 'boost::_bi::bind_t<void,struct boost::_mfi::mf1<void,struct A::c,char const *>,class boost::_bi::list2<class boost::arg<1>,cla ss boost::arg<2> > >' being compiled boost/bind/mem_fn_vw.hpp(31) : error C2872: 'c' : ambiguous symbol boost/bind.hpp(875) : see reference to class template instantiation 'boost::_mfi::mf1<void,struct A::c,char const *>' being compiled boost/bind.hpp(886) : see reference to class template instantiation 'boost::_bi::bind_t_generator<void>::implementation<struct boost::_mfi::mf1<void,struct A::c,char const *>,class boost::_bi::list2<class boost::arg<1>,class boost::arg<2> > >' being compiled test.cpp(15) : see reference to class template instantiation 'boost::_bi::bind_t<void,struct boost::_mfi::mf1<void,struct A::c,char const *>,class boost::_bi::list2<class boost::arg<1>,class boost::arg<2> > >' being compiled Best, Andre Hentz Yahoo! Groups Sponsor ADVERTISEMENT <http://rd.yahoo.com/M=237459.2675695.4055211.2225243/D=egroupweb/S=17050067 88:HM/A=1267611/R=0/*http://ad.doubleclick.net/jump/N2524.Yahoo/B1071650;sz= 300x250;ord=1038499880908608?> <http://us.adserver.yahoo.com/l?M=237459.2675695.4055211.2225243/D=egroupmai l/S=:HM/A=1267611/rand=601430356> Info: < http://www.boost.org <http://www.boost.org> > Wiki: < http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl> > Unsubscribe: <mailto:boost-users-unsubscribe@xxxxxxxxxxxxxxx> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor ---------------------~--> Get 128 Bit SSL Encryption! http://us.click.yahoo.com/CBxunD/vN2EAA/xGHJAA/EbFolB/TM ---------------------------------------------------------------------~-> Info: <http://www.boost.org> Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl> Unsubscribe: <mailto:boost-users-unsubscribe@xxxxxxxxxxxxxxx> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: ublas::matrix sharing storage with ublas::vecto r: 00319, jhr . walter |
|---|---|
| Next by Date: | Re: Using function_traits: 00319, John Maddock |
| Previous by Thread: | MSVC++, bind and namespacesi: 00319, Andre Hentz |
| Next by Thread: | boost::iterator_adaptor: 00319, Julia Donawald |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |