diff --git a/doc/conversion.qbk b/doc/conversion.qbk index b61a3cc..65b018e 100644 --- a/doc/conversion.qbk +++ b/doc/conversion.qbk @@ -91,7 +91,7 @@ crosscasts of pointers to polymorphic objects, but error notification in the form of a returned value of 0 is inconvenient to test, or worse yet, easy to forget to test. The throwing form of `dynamic_cast`, which works on references, can be used on pointers through the ugly expression -`&dynamic_cast(*p), which causes undefined +`&dynamic_cast(*p)`, which causes undefined behavior if `p` is `0`. The `polymorphic_cast` template performs a `dynamic_cast` on a pointer, and throws an exception if the `dynamic_cast` returns 0. @@ -99,12 +99,12 @@ exception if the `dynamic_cast` returns 0. For crosscasts, or when the success of a cast can only be known at runtime, or when efficiency is not important, `polymorphic_cast` is preferred. -The C++ built-in dynamic_cast must be used to cast references rather than pointers. +The C++ built-in `dynamic_cast` must be used to cast references rather than pointers. It is also the only cast that can be used to check whether a given interface is supported; in that case a return of 0 isn't an error condition. [#polymorphic_pointer_cast] -While polymorphic_downcast and polymorphic_cast work with built-in pointer types only, -polymorphic_pointer_downcast and polymorphic_pointer_cast are more generic versions +While `polymorphic_downcast` and `polymorphic_cast` work with built-in pointer types only, +`polymorphic_pointer_downcast` and `polymorphic_pointer_cast` are more generic versions with support for any pointer type for which the following expressions would be valid: For `polymorphic_pointer_downcast`: @@ -192,6 +192,6 @@ This includes C++ built-in pointers, `std::shared_ptr`, `polymorphic_pointer_downcast` was contributed by [@http://www.boost.org/people/boris_rasin.htm Boris Rasin] and `polymorphic_pointer_cast` by Antony Polukhin. -An old numeric_cast that was contributed by [@http://www.boost.org/people/kevlin_henney.htm Kevlin Henney] +An old `numeric_cast` that was contributed by [@http://www.boost.org/people/kevlin_henney.htm Kevlin Henney] is now superseeded by the [@boost:numeric_conversion/doc/html/html/boost_numericconversion/improved_numeric_cast__.html Boost Numeric Conversion Library] [endsect]