As specified in 23.3.7.1.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
The code changes look good to me.
For the tests, what we've done is to put the tests in with the other tests for that feature.
take a look at test/std/containers/sequences/array/front_back.pass.cpp for an example.
Marshall,
I've updated the diff according to your comments. I also added support for reverse_iterator to be constexpr.
General inconsistency with the constexpr macros.
We need to be clear that this is a C++17 feature (it was introduced via a paper, rather than an issue).
include/array | ||
---|---|---|
164 | I don't think this is right. This is a C++17 feature, we don't want to enable this for C++14 (which is was _LIBCPP_CONSTEXPR_AFTER_CXX11 does). You need to use _LIBCPP_CONSTEXPR_AFTER_CXX14 for this. | |
include/iterator | ||
566 | Why just _LIBCPP_CONSTEXPR here? | |
569 | And here you *did* use _LIBCPP_CONSTEXPR_AFTER_CXX14. | |
test/std/containers/sequences/array/front_back.pass.cpp | ||
84 | These tests need to be bracketed with a #if TEST_STD_VER > 14 |
It seems to me that there should be a lot more tests here, too.
You've added constexpr in a lot of routines, but I only see tests for a few of them.
I don't think this is right. This is a C++17 feature, we don't want to enable this for C++14 (which is was _LIBCPP_CONSTEXPR_AFTER_CXX11 does).
You need to use _LIBCPP_CONSTEXPR_AFTER_CXX14 for this.