cplusplus / draft

C++ standards drafts
http://www.open-std.org/jtc1/sc22/wg21/
5.71k stars 751 forks source link

[basic.compound] Update introduction #7362

Open Eisenwave opened 3 weeks ago

Eisenwave commented 3 weeks ago

This PR cleans up a few wording discrepancies in the introduction to compound types:

  1. We don't like to say that "functions return references". Any such case would mean that the function is declared with reference return type, but the reference would be transformed into an lvalue or xvalue designating the object upon the call. If we just say "a result", we keep it vague and correct.

  2. The list of what classes contain tries to be exhaustive without much benefit. We can just say that classes contain class members, which does not miss many things not listed here, such as static_assert, template, etc.