
On 17/12/2016 16:45, Peter Dimov wrote:
Edward Diener wrote:
The zip_iterator_test_std_pair is failing with gcc in c++-03 mode. The problem reduces viqa Boost type traits to the fact that in gcc c++03 mode the expression:
__is_abstract(std::pair
) where __is_abstract is a compiler intrinsic, gives an error of:
error: forming reference to reference type 'std::__cxx11::basic_string<char>&' pair(const _T1& __a, const _T2& __b) ^~~~
Is this a valid error according to the C++ 2003 standard ?
References to references were invalid in C++98, but were made conditionally valid in C++03 by
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#106
However, __is_abstract is nonstandard, so who knows what it does. It might be worth trying -std=gnu++03 instead of -std=c++03.
I think the issue here is that you are calling
__is_abstract(malformed_type) - so when the compiler instantiates
std::pair