2015-08-23 23:46:44 -04:00
|
|
|
#include <boost/config.hpp>
|
|
|
|
|
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
2021-09-12 22:35:44 +03:00
|
|
|
// 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)
|
2015-08-23 23:46:44 -04:00
|
|
|
|
|
|
|
#include <tuple>
|
|
|
|
#include <boost/fusion/adapted/std_tuple.hpp>
|
|
|
|
|
|
|
|
#define ZI_TUPLE std::tuple
|
|
|
|
#define ZI_MAKE_TUPLE std::make_tuple
|
|
|
|
#define ZI_TUPLE_GET(n) std::get<n>
|
|
|
|
|
|
|
|
#include "detail/zip_iterator_test_original.ipp"
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
int main()
|
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
2021-09-12 22:35:44 +03:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2015-08-23 23:46:44 -04:00
|
|
|
|
|
|
|
#endif
|