C++ Logo

std-discussion

Advanced search

Re: Potential defect in the behaviour of the rvalue constructors for std::tuple and std::pair.

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Sat, 11 Nov 2023 02:15:24 +0200
On Sat, 11 Nov 2023 at 01:53, Jason McKesson via Std-Discussion
<std-discussion_at_[hidden]> wrote:

> Yes, types like `tuple` *could* override the default behavior, but to
> be honest, it would be kind of weird for a C++ standard library
> aggregate type to behave so differently from a C++ language aggregate
> type. `tuple<not_null>` should behave the same as `container`.

Tuple doesn't, it does override the "default" behavior, intentionally.
So do other
library components, again intentionally. If you wish to change that,
write papers.
This is not an oversight, this is intentional.

Received on 2023-11-11 00:15:37