Talk:cpp/language/type

It might be worth noting that at least back in 2002 it was UB to specialize standard containers with incomplete types. I discussed this problem here: http://en.cppreference.com/w/Talk:cpp/container#We_should_probably_mention_that_it_is_illegal_to_create_containers_with_incomplete_types

rename 'pointer to data member' to 'pointer to member object'
I propose to rename all occurrences of 'pointer-to-data-member' to 'pointer-to-member-object' Reasons: @1@ I noticed chaotic usages of BOTH of them in the wiki, while the first one should be considered as a mistake. A data of member reference type is also of data member, but a pointer to such a member is an error. @2@ Terms 'pointer to object' 'reference to object' are used, which is inconsistent with 'pointer to data member'. More importantly, 'member of object type' (aka member object) is exactly the target of a so-called 'pointer-to-data-member' @3@ In C++ standard, it says 'A non-static data member of non-reference type is a member subobject of a class object', indirectly approves the term 'member object' (or at least 'member subobject')

Note 1: I propose it here instead of editing it directly due to its widespread occurrences including: And so on.
 * cpp/language/pointer, Most occurrences are links to here.
 * cpp/language/type
 * cpp/language/operator_member_access
 * cpp/utility/functional/bind
 * cpp/utility/functional/invoke

Note 2: I found C++ standard is more likely to use 'data member of non-reference type' (4 occurrences in C++20), but isn't it too long for us to use that in wiki? And more strangely, there ARE 6 'pointer-to-data-member' found in C++20 standard with a 'pointer to data member of non-reference type' and 5 others without any suffix (ironically, 3 of 5 is found in definition of INVOKE). Does it mean 'data member' actually implies 'member object'? further discussion is necessary.


 * Problem with "member (sub)object" is that it can refer to base class subobjects. I reckon "pointer to data member object" perhaps? --Ybab321 (talk) 10:41, 24 October 2021 (PDT)


 * I would rather go the other way and purge mentions of "object" from the discussions of pointers to data members, because those beasts do not hold memory addresses and do not point to objects (or anything). Consider : the expression &s.a is a pointer that points to a member subobject, while the expression &S::a is a pointer-to-data-member, which is just a strongly-typed number zero. --Cubbi (talk) 08:33, 25 October 2021 (PDT)