Test for C++20 p0858 - ConstexprIterator requirements.

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Sun Jun 9 22:03:00 GMT 2019


Hi Ed,

>>> I had supplied the option for gnu++2a by hand and they passed.?? They
>>> were not UNSUPPORTED.
>>>
>>> I just added the dg-options (at very top) and reran the testsuite
>>> without fancy tricks (except for gnu++2a).
>>>
>>> I also took out the #if __cplusplus.?? I was just playing around and
>>> discovered that these pass in C++17 if you comment out the C++20
>>> constexpr algos.
>>>
>>> OK for trunk?
>>
>> OK for trunk.
> Committed 272084.

272085 actually ;-)  Unfortunately, the new tests seem to FAIL (almost?)
everywhere:

+FAIL: 21_strings/basic_string_view/requirements/constexpr_iter.cc (test for excess errors)

Excess errors:
/vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:33: error: call to non-'constexpr' function '_OI std::copy(_II, _II, _OI) [with _II = const char*; _OI = int*]'
/vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:41: error: 'constexpr char test()' called in a constant expression

+FAIL: 23_containers/array/requirements/constexpr_iter.cc (test for excess errors)

/vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/23_containers/array/requirements/constexpr_iter.cc:32: error: call to non-'constexpr' function '_OI std::copy(_II, _II, _OI) [with _II = const int*; _OI = int*]'
/vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/23_containers/array/requirements/constexpr_iter.cc:40: error: 'constexpr int test()' called in a constant expression

I'm seeing those on i386-pc-solaris2.11 and sparc-sun-solaris2.11, and
there are gcc-testresults reports on aarch64-unknown-linux-gnu,
i686-pc-linux-gnu, powerpc64le-unknown-linux-gnu, and
x86_64-pc-linux-gnu, among others.

Please fix.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University



More information about the Libstdc++ mailing list