I could not find where the standard states that it is explicitly forbidden to use the copy constructor and copy destination with an argument volatile&
or const volatile&
, for example:
struct A{
A(const volatile A&) =default;
};
There is no such restriction in [dcl.fct.def.default], and [class.copy] indicates that it A(const volatile A&)
is a copy constructor.
Note. I'm just looking for a place in the text of the standard that defines this behavior.
source
share