Operators in C and C++: Difference between revisions

Content deleted Content added
Other: hide noise
Other: format notes as notes
Line 386:
| {{rh}} colspan="2" {{n/a}}
|-
| {{rh}} colspan="2" style="font-size:smaller;" | Note:[[static_cast]] forconversion {{efn|For user-defined conversions, the return type implicitly and necessarily matches the operator name unless the type is inferred (e.g. {{cpp|1=operator auto()}}, {{cpp|1=operator decltype(auto)()}} etc.).}}
| {{rh}} rowspan="2" colspan="2" | [[static_cast]] conversion
| rowspan="2" style="text-align:center;" | <code>'''static_cast'''<R>(a)</code> || rowspan="2" {{yes}} || rowspan="2" {{no}}
| {{cpp|1=K::operator R();}}<br>{{cpp|1=explicit K::operator R();}} {{small|(since C++11)}}
| {{n/a}}
|-
| {{rh}} colspan="2" style="font-size:smaller;" | Note: for user-defined conversions, the return type implicitly and necessarily matches the operator name unless the type is inferred (e.g. {{cpp|1=operator auto()}}, {{cpp|1=operator decltype(auto)()}} etc.).
|-
| {{rh}} colspan="2" | [[dynamic cast]] conversion