Hello!
I did not see a mention of C compatibility or POD/Triviality in the concepts proposal. I was wondering what, if any, changes concepts results causes in the definition of POD/triviality.
#include <iostream>
struct A
{
A() = default;
A(const A&) = default;
A(A&&) = default;
A& operator=(const A&) = default;
A& operator=(A&&) = default;
~A() requires (sizeof(std::size_t) == 5) = default;
};
int main()
{
static_assert(std::is_trivial<A>::value, "");
static_assert(std::is_pod<A>::value, "");
// does not compile
// A a;
// A b(a);
return 0;
}
See section 12.4.5.4 through 12.4.5.6 of the current working draft for the definition of trivial destructors. Copy/move constructors/assignment operators may also be affected.
Keeping it brief,
- xcvr