Alternatively, there is an example of a type with a copy constructor that can throw, but is it not trivial? And if not, does this mean that it is_nothrow_copy_constructible_v<T>
must be true whenever is_trivially_copy_constructible_v<T>
true?
Please note that according to the standard ( last draft [23.15.4.3]), for a type T that must be incompatible, we need an expression T t(declval<const T&>());
to be a well-formed variable definition that is known to throw no exceptions . This formulation, apparently, lends itself to me somewhat - what does it mean that something will be known ? Should the qualifier noexcept
be sufficient to establish this knowledge? or perhaps the definition remains for implementation?
Edit: I understand that there is a difference between triviality and the ability to create a trivial copy. I am focused on the latter.
source
share