C++ style guide: Difference between revisions

Jump to navigation Jump to search
44 bytes added ,  7 December 2020
m
Tweak type casting language
m (Add recommendation on type casting.)
m (Tweak type casting language)
Line 195: Line 195:
=== C++ style casting ===
=== C++ style casting ===


Always use one of the four C++ long style casting forms ({{codeline|static_cast, dynamic_cast, reinterpret_cast, const_cast}}) rather than C-style forms (type cast {{codeline|(new_type) variable}} or function form {{codeline|new_type (variable)}}.
Always use one of the four C++ long style casting forms ({{codeline|static_cast}}, {{codeline|dynamic_cast}}, {{codeline|reinterpret_cast}}, {{codeline|const_cast}}) rather than C-style forms (type cast {{codeline|(new_type) variable}} or the function form {{codeline|new_type (variable)}}).


=== C++14 ===
=== C++14 ===
1,072

edits

Navigation menu