![]() ![]() they are both pointers to member of the same class, and the types of the pointed-to members are similar or.they are both pointers, and the pointed-to types are similar or.Informally, two types are similar if, ignoring top-level cv-qualification: AliasedType is std::byte, (since C++17) char, or unsigned char: this permits examination of the object representation of any object as an array of bytes.AliasedType is the (possibly cv-qualified) signed or unsigned variant of DynamicType.AliasedType and DynamicType are similar.Whenever an attempt is made to read or modify the stored value of an object of type DynamicType through a glvalue of type AliasedType, the behavior is undefined unless one of the following is true: an xvalue if target-type is an rvalue reference to object type.an lvalue if target-type is an lvalue reference type or an rvalue reference to function type (since C++11).If T2's alignment is not stricter than T1's, conversion back to the original type T1 yields the original value, otherwise the resulting pointer cannot be used safely.Īs with all cast expressions, the result is: 11) A pointer to member object of some class T1 can be converted to a pointer to another member object of another class T2.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |