C++ Logo

std-discussion

Advanced search

Re: What does [res.on.functions] actually mean? (related to: "Atomic shared ptr behaviour")

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Sun, 14 Feb 2021 18:27:01 -0500
Why does [res.on.functions] matter here? [atomics.types.generic]/1 clearly says:

> The template argument for T shall be trivially copyable (6.9).

And it has said that since C++11. If the standard says that "X shall
be Y", and "X" is under the control of the user, this means the
program is ill formed if "X" does not conform to the restriction "Y".

C++20 just uses different words to say the same thing.

Received on 2021-02-14 17:27:15