Created on 2024-07-20.00:00:00 last changed 15 months ago
Proposed resolution:
This wording is relative to N4986.
Modify [inplace.vector.overview], class template std::inplace_vector synopsis, as indicated:
namespace std {
template<class T, size_t N>
class inplace_vector {
public:
[…]
constexpr friend bool operator==(const inplace_vector& x,
const inplace_vector& y);
constexpr friend synth-three-way-result<T>auto
operator<=>(const inplace_vector& x, const inplace_vector& y);
requires requires (const T t) { synth-three-way(t, t); }
{
return lexicographical_compare_three_way(x.begin(), x.end(), y.begin(), y.end(),
synth-three-way);
}
constexpr friend void swap(inplace_vector& x, inplace_vector& y)
noexcept(N == 0 || (is_nothrow_swappable_v<T> &&
is_nothrow_move_constructible_v<T>))
{ x.swap(y); }
};
};
[ 2024-08-02; Reflector poll ]
Set priority to 2 after reflector poll.
This is almost the same problem as LWG 4071 except that it happens to std::inplace_vector. As the operator<=> overload for std::inplace_vector is a non-template function whose return type (synth-three-way-result<T>) is not deduced, when the return type is ill-formed, hard error occurs in the instantiation of the enclosing std::inplace_vector<T, N>.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2024-08-02 21:14:44 | admin | set | messages: + msg14283 |
| 2024-07-21 09:47:10 | admin | set | messages: + msg14260 |
| 2024-07-20 00:00:00 | admin | create | |