Operators in C and C++: Difference between revisions

Content deleted Content added
Other: use auto width
Other: hide noise
Line 382:
| {{n/a}}
|-
| {{rh}} style=font-size:smaller colspan="2" | Note:[[type behavesconversion|Conversion]] {{efn|Behaves like const_cast/static_cast/reinterpret_cast. In the last two cases, the <code>auto</code> specifier is replaced with the type of the invented variable x declared with <code>auto x(a);</code> (which is never interpreted as a function declaration) or <code>auto x{a};</code>, respectively. }}<ref>[https://en.cppreference.com/w/cpp/language/explicit_cast Explicit type conversion] in C++</ref>
| {{rh}} colspan="2" | [[type conversion|Conversion]]
| style="text-align:center;" | <code>R(a)</code><br><code>R{a}</code><sup>since C++11</sup><br><code>auto(a)</code><sup>since C++23</sup><br><code>auto{a}</code><sup>since C++23</sup> || {{no}} || {{no}}
| {{rh}} colspan="2" {{n/a}}
| {{rh}} style=font-size:smaller colspan="2" | Note: behaves like const_cast/static_cast/reinterpret_cast. In the last two cases the <code>auto</code> specifier is replaced with the type of the invented variable x declared with <code>auto x(a);</code> (which is never interpreted as a function declaration) or <code>auto x{a};</code>, respectively. <ref>[https://en.cppreference.com/w/cpp/language/explicit_cast Explicit type conversion] in C++</ref>
|-
| {{rh}} rowspan="2" colspan="2" | [[static_cast]] conversion