mirror of
https://github.com/boostorg/conversion.git
synced 2026-07-10 18:30:52 +02:00
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.
Description
Languages
C++
91.9%
CMake
5%
HTML
3.1%

