![]() |
MySQL 9.7.0
Source Code Documentation
|
Concept requiring that objects are copyable using memcpy, and equality-testable using memcmp. More...
#include <table_with_cursor.h>
Concept requiring that objects are copyable using memcpy, and equality-testable using memcmp.
"Copyable using memcpy" is implied by std::is_trivially_copyable_v<Type>.
"Equality-testable using memcmp" cannot be checked in C++. Therefore, that is a semantic requirement (see https://en.cppreference.com/w/cpp/concepts ). A type that fails to be comparable using memcpy will not necessarily make the concept false; only make the program behavior undefined. This semantic requirement implies that the type has no internal padding bytes, which is for example guaranteed by:
Although the compiler cannot deduce if a class is equality-testable using memcmp, you can check it manually on a given platform, by verifying (recursively, for nested objets) that the sum of the sizes of all parts is equal the size of the object as a whole.
tparam Type The class to test.