forked from boostorg/conversion
e130cd860c21fb85919cf9e25fcff8b9634583ea
To make it clear:
Base* base = new Base();
static_cast<Derived*>(base) ===> OK
static_cast<Derived&>(*base) ===> OK
boost::polymorphic_downcast<Derived*>(base) ===> OK
boost::polymorphic_downcast<Derived&>(*base) ===> IMPOSSIBLE
boost::polymorphic_downcast being a kind of "debug-safe version" of
static_cast, it should provide the same capabilities.
This patch extend boost::polymorphic_downcast to support references just
like static_cast does.
This is achieved by introducing a partial specialization for references.
Unit tests have been updated accordingly.
Boost.Conversion
Boost.Conversion is one of the Boost C++ Libraries. This library improves program safety and clarity by performing otherwise messy conversions.
Test results
| @ | Build | Tests coverage | More info |
|---|---|---|---|
| Develop branch: | ![]() |
details... | |
| Master branch: | ![]() |
details... |
License
Distributed under the Boost Software License, Version 1.0.
Languages
C++
92.3%
CMake
4.2%
HTML
3.5%

