Bug#803049: barry: FTBFS: error: call of overloaded 'mem_fn(void (XmlNodeMapping::*)(std::ostream&) const)' is ambiguous
On Mon, 26 Oct 2015 11:23:14 + Chris Lambwrote: > Source: barry > Version: 0.18.5-1.1 > Severity: serious > Justification: fails to build from source > User: reproducible-bui...@lists.alioth.debian.org > Usertags: ftbfs > X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org > > Dear Maintainer, > > barry fails to build from source in unstable/amd64: > > [..] > > In file included from /usr/include/c++/5/memory:81:0, >from >/usr/include/libxml++-2.6/libxml++/parsers/saxparser.h:14, >from >/usr/include/libxml++-2.6/libxml++/libxml++.h:53, >from xmlmap.h:30, >from xmlmap.cc:24: > /usr/include/c++/5/bits/unique_ptr.h:49:28: note: declared here > template class auto_ptr; > ^ > xmlmap.cc: In function 'int main(int, char**)': > xmlmap.cc:543:47: error: call of overloaded 'mem_fn(void > (XmlNodeMapping::*)(std::ostream&) const)' is ambiguous > bind( mem_fn(::DumpSummaries), > ^ > In file included from xmlmap.cc:522:0: > /usr/include/c++/5/tr1/functional:827:5: note: candidate: > std::tr1::_Mem_fn<_Tp _Class::*> std::tr1::mem_fn(_Tp _Class::*) [with > _Tp = void(std::basic_ostream&) const; _Class = XmlNodeMapping] >mem_fn(_Tp _Class::* __pm) >^ > In file included from /usr/include/c++/5/memory:79:0, >from >/usr/include/libxml++-2.6/libxml++/parsers/saxparser.h:14, >from >/usr/include/libxml++-2.6/libxml++/libxml++.h:53, >from xmlmap.h:30, >from xmlmap.cc:24: > /usr/include/c++/5/functional:739:5: note: candidate: std::_Mem_fn<_Tp > _Class::*> std::mem_fn(_Tp _Class::*) [with _Tp = > void(std::basic_ostream&) const; _Class = XmlNodeMapping] >mem_fn(_Tp _Class::* __pm) noexcept >^ > xmlmap.cc:544:17: error: call of overloaded 'ref(std::ostream&)' is > ambiguous >_1, ref(cout))); >^ > In file included from xmlmap.cc:522:0: > /usr/include/c++/5/tr1/functional:505:5: note: candidate: > std::tr1::reference_wrapper<_Tp> std::tr1::ref(_Tp&) [with _Tp = > std::basic_ostream] >ref(_Tp& __t) >^ > In file included from /usr/include/c++/5/memory:79:0, >from >/usr/include/libxml++-2.6/libxml++/parsers/saxparser.h:14, See this discussion I had with gtkmm upstream: https://bugzilla.gnome.org/show_bug.cgi?id=755750#c9 barry_0.18.5-1.1.log Call to ref() ambiguous because of std::ref() and std::tr1::ref() -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#803049: barry: FTBFS: error: call of overloaded 'mem_fn(void (XmlNodeMapping::*)(std::ostream&) const)' is ambiguous
Thanks Chris! This bug can be fixed with the following patch: commit c3860b75b588f860d83f10b08749ffdc0a9271bd Author: Chris FreyDate: Tue Oct 27 22:23:56 2015 -0400 desktop: avoid ambiguous function calls with newer compilers diff --git a/desktop/src/xmlmap.cc b/desktop/src/xmlmap.cc index 6b06531..ff26267 100644 --- a/desktop/src/xmlmap.cc +++ b/desktop/src/xmlmap.cc @@ -520,8 +520,6 @@ XmlNodeMap& XmlNodeMap::operator=(const XmlNodeMap ) #include #include #include -using namespace std::tr1; -using namespace std::tr1::placeholders; int main(int argc, char *argv[]) { @@ -540,14 +538,18 @@ int main(int argc, char *argv[]) np.SortBySummary(); cout << "\n\nCute summary:\n"; for_each(np.begin(), np.priority_end(), - bind( mem_fn(::DumpSummaries), - _1, ref(cout))); + std::tr1::bind( + std::tr1::mem_fn(::DumpSummaries), + std::tr1::placeholders::_1, + std::tr1::ref(cout))); np.SortByPath(); cout << "\n\nCute summary:\n"; for_each(np.begin(), np.priority_end(), - bind( mem_fn(::DumpSummaries), - _1, ref(cout))); + std::tr1::bind( + std::tr1::mem_fn(::DumpSummaries), + std::tr1::placeholders::_1, + std::tr1::ref(cout))); } catch( Glib::ConvertError ) { cerr << e.what() << endl; I'm hoping to fix a bunch of other small things at the same time. But if this is super urgent, feel free to proceed with this patch. Thanks, - Chris
Bug#803049: barry: FTBFS: error: call of overloaded 'mem_fn(void (XmlNodeMapping::*)(std::ostream&) const)' is ambiguous
Source: barry Version: 0.18.5-1.1 Severity: serious Justification: fails to build from source User: reproducible-bui...@lists.alioth.debian.org Usertags: ftbfs X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org Dear Maintainer, barry fails to build from source in unstable/amd64: [..] In file included from /usr/include/c++/5/memory:81:0, from /usr/include/libxml++-2.6/libxml++/parsers/saxparser.h:14, from /usr/include/libxml++-2.6/libxml++/libxml++.h:53, from xmlmap.h:30, from xmlmap.cc:24: /usr/include/c++/5/bits/unique_ptr.h:49:28: note: declared here template class auto_ptr; ^ xmlmap.cc: In function 'int main(int, char**)': xmlmap.cc:543:47: error: call of overloaded 'mem_fn(void (XmlNodeMapping::*)(std::ostream&) const)' is ambiguous bind( mem_fn(::DumpSummaries), ^ In file included from xmlmap.cc:522:0: /usr/include/c++/5/tr1/functional:827:5: note: candidate: std::tr1::_Mem_fn<_Tp _Class::*> std::tr1::mem_fn(_Tp _Class::*) [with _Tp = void(std::basic_ostream&) const; _Class = XmlNodeMapping] mem_fn(_Tp _Class::* __pm) ^ In file included from /usr/include/c++/5/memory:79:0, from /usr/include/libxml++-2.6/libxml++/parsers/saxparser.h:14, from /usr/include/libxml++-2.6/libxml++/libxml++.h:53, from xmlmap.h:30, from xmlmap.cc:24: /usr/include/c++/5/functional:739:5: note: candidate: std::_Mem_fn<_Tp _Class::*> std::mem_fn(_Tp _Class::*) [with _Tp = void(std::basic_ostream&) const; _Class = XmlNodeMapping] mem_fn(_Tp _Class::* __pm) noexcept ^ xmlmap.cc:544:17: error: call of overloaded 'ref(std::ostream&)' is ambiguous _1, ref(cout))); ^ In file included from xmlmap.cc:522:0: /usr/include/c++/5/tr1/functional:505:5: note: candidate: std::tr1::reference_wrapper<_Tp> std::tr1::ref(_Tp&) [with _Tp = std::basic_ostream] ref(_Tp& __t) ^ In file included from /usr/include/c++/5/memory:79:0, from /usr/include/libxml++-2.6/libxml++/parsers/saxparser.h:14, from /usr/include/libxml++-2.6/libxml++/libxml++.h:53, from xmlmap.h:30, from xmlmap.cc:24: /usr/include/c++/5/functional:436:5: note: candidate: std::reference_wrapper<_Tp> std::ref(_Tp&) [with _Tp = std::basic_ostream] ref(_Tp& __t) noexcept ^ xmlmap.cc:549:47: error: call of overloaded 'mem_fn(void (XmlNodeMapping::*)(std::ostream&) const)' is ambiguous bind( mem_fn(::DumpSummaries), ^ In file included from xmlmap.cc:522:0: /usr/include/c++/5/tr1/functional:827:5: note: candidate: std::tr1::_Mem_fn<_Tp _Class::*> std::tr1::mem_fn(_Tp _Class::*) [with _Tp = void(std::basic_ostream&) const; _Class = XmlNodeMapping] mem_fn(_Tp _Class::* __pm) ^ In file included from /usr/include/c++/5/memory:79:0, from /usr/include/libxml++-2.6/libxml++/parsers/saxparser.h:14, from /usr/include/libxml++-2.6/libxml++/libxml++.h:53, from xmlmap.h:30, from xmlmap.cc:24: /usr/include/c++/5/functional:739:5: note: candidate: std::_Mem_fn<_Tp _Class::*> std::mem_fn(_Tp _Class::*) [with _Tp = void(std::basic_ostream&) const; _Class = XmlNodeMapping] mem_fn(_Tp _Class::* __pm) noexcept ^ xmlmap.cc:550:17: error: call of overloaded 'ref(std::ostream&)' is ambiguous _1, ref(cout))); ^ In file included from xmlmap.cc:522:0: /usr/include/c++/5/tr1/functional:505:5: note: candidate: std::tr1::reference_wrapper<_Tp> std::tr1::ref(_Tp&) [with _Tp = std::basic_ostream] ref(_Tp& __t) ^ In file included from /usr/include/c++/5/memory:79:0, from /usr/include/libxml++-2.6/libxml++/parsers/saxparser.h:14, from /usr/include/libxml++-2.6/libxml++/libxml++.h:53, from xmlmap.h:30, from xmlmap.cc:24: /usr/include/c++/5/functional:436:5: note: candidate: std::reference_wrapper<_Tp> std::ref(_Tp&) [with _Tp = std::basic_ostream] ref(_Tp& __t) noexcept ^ Makefile:1540: recipe for target 'xmlmap-xmlmap.o' failed make[6]: *** [xmlmap-xmlmap.o] Error 1 make[6]: Leaving directory '/build/barry-0.18.5/desktop/src' Makefile:1583: recipe for target 'all-recursive' failed make[5]: *** [all-recursive] Error 1 make[5]: Leaving directory '/build/barry-0.18.5/desktop/src' Makefile:465: recipe for target 'all-recursive' failed make[4]: ***