Skip to content

<vector>: Test constexpr spaceships #1677

@StephanTLavavej

Description

@StephanTLavavej

#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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixedSomething works now, yay!spaceshipC++20 operator <=>testRelated to test code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions