Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<vector>: Test constexpr spaceships #1677

Closed
StephanTLavavej opened this issue Feb 23, 2021 · 0 comments · Fixed by #1884
Closed

<vector>: Test constexpr spaceships #1677

StephanTLavavej opened this issue Feb 23, 2021 · 0 comments · Fixed by #1884
Labels
fixed Something works now, yay! spaceship C++20 operator <=> test Related to test code

Comments

@StephanTLavavej
Copy link
Member

#1655 added constexpr to vector spaceship:

STL/stl/inc/vector

Lines 1909 to 1911 in 5547f0f

template <class _Ty, class _Alloc>
_NODISCARD _CONSTEXPR20_CONTAINER _Synth_three_way_result<_Ty> operator<=>(
const vector<_Ty, _Alloc>& _Left, const vector<_Ty, _Alloc>& _Right) {

#1648 added vector::iterator spaceships with constexpr:

_NODISCARD _CONSTEXPR20_CONTAINER strong_ordering operator<=>(const _Vector_const_iterator& _Right) const noexcept {

_NODISCARD _CONSTEXPR20_CONTAINER strong_ordering operator<=>(const _Vb_const_iterator& _Right) const noexcept {

When VS 2019 16.10 Preview 2 is available, we should test vector/vector<bool>'s container/iterator spaceships for constexpr (in tests/std/tests/P1614R2_spaceship/test.cpp).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed Something works now, yay! spaceship C++20 operator <=> test Related to test code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant