The language requires operators `=`, `()`, `[]`, and `->` to be members.
###### Exception
An overload set may have some members that do not directly access `private` data:
@ -17264,6 +17288,7 @@ Type safety profile summary:
* [Type.4: Don't use C-style `(T)expression` casts that would perform a `static_cast` downcast, `const_cast`, or `reinterpret_cast`](#Pro-type-cstylecast)
* [Type.5: Don't use a variable before it has been initialized](#Pro-type-init)
* [Type.6: Always initialize a member variable](#Pro-type-memberinit)
* [Type.7: Don't use `T(expression)` for casting`](#Pro-fct-style-cast)
### <aname="Pro-type-reinterpretcast"></a>Type.1: Don't use `reinterpret_cast`.
@ -17456,6 +17481,29 @@ Note that a C-style `(T)expression` cast means to perform the first of the follo
Issue a diagnostic for any use of a C-style `(T)expression` cast that would invoke a `static_cast` downcast, `const_cast`, or `reinterpret_cast`. To fix: Use a `dynamic_cast`, `const`-correct declaration, or `variant`, respectively.
### <aname="Pro-fct-style-cast"></a>Type.7: Don't use `T(expression)` for casting`
##### Reason
If `e` is of a built-in type, `T(e)` is equivalent to the error-prone `(T)e`.
##### Example, bad
int* p = f(x);
auto i = int(p); // Potential damaging cast; don't or use `reinterpret_cast`
short s = short(i); // potentially narrowing; don't or use `narrow` or `narrow_cast`
##### Note
The {}-syntax makes the desire for construction explicit and doesn't allow narrowing
f(Foo{bar});
##### Enforcement
Flag `T(e)` if used for `e` of a built-in type.
### <aname="Pro-type-init"></a>Type.5: Don't use a variable before it has been initialized.
[ES.20: Always initialize an object](#Res-always) is required.