Disable zip_iterator test with std::tuple on gcc 4.4.

libstdc++ from gcc 4.4 has a broken std::tuple that fails to compile
a constructor from a compatible tuple:

/usr/include/c++/4.4/tuple: In constructor 'std::_Head_base<_Idx, _Head, false>::_Head_base(_UHead&&) [with _UHead = std::_Head_base<0ul, const int&, false>, long unsigned int _Idx = 0ul, _Head = int]':
/usr/include/c++/4.4/tuple:179:   instantiated from 'std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(std::_Tuple_impl<_Idx, _UElements ...>&&) [with _UElements = const int&, double&, long unsigned int _Idx = 0ul, _Head = int, _Tail = double]'
/usr/include/c++/4.4/tuple:338:   instantiated from 'std::tuple<_T1, _T2>::tuple(std::tuple<_U1, _U2>&&) [with _U1 = const int&, _U2 = double&, _T1 = int, _T2 = double]'
libs/iterator/test/detail/zip_iterator_test_original.ipp:137:   instantiated from here
/usr/include/c++/4.4/tuple:94: error: cannot convert 'std::_Head_base<0ul, const int&, false>' to 'int' in initialization
This commit is contained in:
Andrey Semashev 2021-09-12 22:35:44 +03:00
parent 1447c566d1
commit 18337e990b

View File

@ -1,6 +1,9 @@
#include <boost/config.hpp>
#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
// libstdc++ from gcc 4.4 has a broken std::tuple that cannot be constructed from a compatible tuple,
// e.g. std::tuple<int, double> from std::tuple<int const&, double const&>.
#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \
(!defined(BOOST_LIBSTDCXX_VERSION) || BOOST_LIBSTDCXX_VERSION >= 40500)
#include <tuple>
#include <boost/fusion/adapted/std_tuple.hpp>
@ -14,8 +17,8 @@
#else
int main()
{
return 0;
}
{
return 0;
}
#endif