[C.148] Fix 1 anchor link (#1904)

This commit is contained in:
William So
2022-04-06 04:17:56 +08:00
committed by GitHub
parent 66bdbf1a90
commit d9d985a9f6

View File

@@ -8092,7 +8092,7 @@ Casting to a reference expresses that you intend to end up with a valid object,
The `dynamic_cast` conversion allows to test whether a pointer is pointing at a polymorphic object that has a given class in its hierarchy. Since failure to find the class merely returns a null value, it can be tested during run time. This allows writing code that can choose alternative paths depending on the results. The `dynamic_cast` conversion allows to test whether a pointer is pointing at a polymorphic object that has a given class in its hierarchy. Since failure to find the class merely returns a null value, it can be tested during run time. This allows writing code that can choose alternative paths depending on the results.
Contrast with [C.147](#Rh-ptr-cast), where failure is an error, and should not be used for conditional execution. Contrast with [C.147](#Rh-ref-cast), where failure is an error, and should not be used for conditional execution.
##### Example ##### Example