[go: nahoru, domu]

Type safety: Difference between revisions

Content deleted Content added
Undid revision 942434988 by 123.28.150.169 (talk)
Line 90:
* C++ code can use virtual functions and [[Template (programming)|templates]] to achieve polymorphism without void pointers.
* Safer casting operators, such as [[dynamic cast]] that performs run-time type checking.
* [[C++11#Strongly_typed_enumerations|C++11 strongly -typed enumerations]] cannot be implicitly converted to or from integers or other enumeration types.
* [[C++11#Explicit_conversion_operators|C++ explicit constructors and C++11 explicit conversion operators]] prevent implicit type conversions.