Source: libzeep Version: 3.0.2-3 Severity: important Tags: patch Control: block 816569 by -1
When compiled against libboost1.60 that is compiled with g++-6 compilation fails because std::tie and boost::fusion::tie are both availabe with equal signatures (see below). The attached patch fixes this. Currently, boost1.60 is still compiled with g++-5 and not yet the default, but this will probably change soon. error log: g++ -MD -c -o obj/doctype.o src/doctype.cpp -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -I. -fPIC -pthread -shared -std=c++0x -Wall src/doctype.cpp: In member function 'virtual boost::fusion::tuple<bool, bool> zeep::xml::doctype::state_repeated_zero_or_once::allow(const string&)': src/doctype.cpp:135:20: error: call of overloaded 'tie(bool&, bool&)' is ambiguous tie(result, done) = m_sub->allow(name); ^ In file included from /usr/include/boost/fusion/tuple.hpp:13:0, from /usr/include/boost/fusion/include/tuple.hpp:11, from /usr/include/boost/tr1/tuple.hpp:58, from src/doctype.cpp:12: /usr/include/boost/fusion/tuple/tuple_tie.hpp:30:5: note: candidate: boost::fusion::tuple<T& ...> boost::fusion::tie(T& ...) [with T = {bool, bool}] tie(T&... arg) ^~~ In file included from /usr/include/c++/6/functional:55:0, from /usr/include/boost/fusion/support/detail/as_fusion_element.hpp:15, from /usr/include/boost/fusion/algorithm/transformation/push_back.hpp:11, from /usr/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp:20, from /usr/include/boost/fusion/view/iterator_range/detail/segments_impl.hpp:14, from /usr/include/boost/fusion/view/iterator_range/iterator_range.hpp:22, from /usr/include/boost/fusion/view/iterator_range.hpp:11, from /usr/include/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp:13, from /usr/include/boost/fusion/sequence/intrinsic/begin.hpp:18, from /usr/include/boost/fusion/mpl/begin.hpp:12, from /usr/include/boost/fusion/sequence/intrinsic/detail/segmented_size.hpp:18, from /usr/include/boost/fusion/sequence/intrinsic/size.hpp:17, from /usr/include/boost/fusion/container/vector/vector.hpp:32, from /usr/include/boost/fusion/tuple/tuple.hpp:23, from /usr/include/boost/fusion/tuple.hpp:11, from /usr/include/boost/fusion/include/tuple.hpp:11, from /usr/include/boost/tr1/tuple.hpp:58, from src/doctype.cpp:12: /usr/include/c++/6/tuple:1521:5: note: candidate: constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {bool, bool}] tie(_Elements&... __args) noexcept ^~~ src/doctype.cpp:143:20: error: call of overloaded 'tie(bool&, bool&)' is ambiguous tie(result, done) = m_sub->allow(name); ^ Best, Gert -- System Information: Debian Release: stretch/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.5.0-2-amd64 (SMP w/2 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
Author: Gert Wollny <gw.foss...@gmail.com> Last-Update: Wed, 11 May 2016 Description: Correct use of boost::fusion::tie With the combination of g++6 and boost-1.60 compiled with g++-6 both provide the function tie with equal signatures, hence compilation fails. This patch ensures that always boost::fusion::tie is used. --- a/src/doctype.cpp +++ b/src/doctype.cpp @@ -132,7 +132,7 @@ switch (m_state) { case state_Start: - tie(result, done) = m_sub->allow(name); + boost::fusion::tie(result, done) = m_sub->allow(name); if (result == true) m_state = state_Loop; else @@ -140,7 +140,7 @@ break; case state_Loop: - tie(result, done) = m_sub->allow(name); + boost::fusion::tie(result, done) = m_sub->allow(name); if (result == false and done) done = true; break; @@ -172,7 +172,7 @@ switch (m_state) { case state_Start: - tie(result, done) = m_sub->allow(name); + boost::fusion::tie(result, done) = m_sub->allow(name); if (result == true) m_state = state_Loop; else @@ -180,11 +180,11 @@ break; case state_Loop: - tie(result, done) = m_sub->allow(name); + boost::fusion::tie(result, done) = m_sub->allow(name); if (result == false and done) { m_sub->reset(); - tie(result, done) = m_sub->allow(name); + boost::fusion::tie(result, done) = m_sub->allow(name); if (result == false) done = true; } @@ -218,28 +218,28 @@ switch (m_state) { case state_Start: - tie(result, done) = m_sub->allow(name); + boost::fusion::tie(result, done) = m_sub->allow(name); if (result == true) m_state = state_FirstLoop; break; case state_FirstLoop: - tie(result, done) = m_sub->allow(name); + boost::fusion::tie(result, done) = m_sub->allow(name); if (result == false and done) { m_sub->reset(); - tie(result, done) = m_sub->allow(name); + boost::fusion::tie(result, done) = m_sub->allow(name); if (result == true) m_state = state_NextLoop; } break; case state_NextLoop: - tie(result, done) = m_sub->allow(name); + boost::fusion::tie(result, done) = m_sub->allow(name); if (result == false and done) { m_sub->reset(); - tie(result, done) = m_sub->allow(name); + boost::fusion::tie(result, done) = m_sub->allow(name); if (result == false) done = true; } @@ -319,7 +319,7 @@ // fall through case state_Element: - tie(result, done) = (*m_next)->allow(name); + boost::fusion::tie(result, done) = (*m_next)->allow(name); while (result == false and done) { ++m_next; @@ -330,7 +330,7 @@ break; } - tie(result, done) = (*m_next)->allow(name); + boost::fusion::tie(result, done) = (*m_next)->allow(name); } break; } @@ -404,7 +404,7 @@ case state_Start: for (list<state_ptr>::iterator choice = m_states.begin(); choice != m_states.end(); ++choice) { - tie(result, done) = (*choice)->allow(name); + boost::fusion::tie(result, done) = (*choice)->allow(name); if (result == true) { m_sub = *choice; @@ -415,7 +415,7 @@ break; case state_Choice: - tie(result, done) = m_sub->allow(name); + boost::fusion::tie(result, done) = m_sub->allow(name); break; } @@ -490,7 +490,7 @@ bool validator::allow(const string& name) { bool result; - tie(result, m_done) = m_state->allow(name); + boost::fusion::tie(result, m_done) = m_state->allow(name); return result; }