9 Commits

Author SHA1 Message Date
Antony Polukhin
668030fcd6 Remove hard error about C++11 requirement and update CI 2023-08-25 14:59:53 +03:00
Antony Polukhin
2598281d10 drop c++03 support 2023-08-10 18:52:03 +03:00
Antony Polukhin
9a03296816 add C++03 deprecation warnings 2023-05-14 19:49:21 +03:00
Antony Polukhin
58c33270a2 Use boost::addressof and update docs 2020-01-25 10:59:32 +03:00
Julien DELACROIX
e130cd860c boost::polymorphic_downcast only supports raw pointer cast, which is a gap compared to static_cast.
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.
2019-12-09 08:51:10 +01:00
Antony Polukhin
6199649ae2 Move polymorphic_pointer_downcast to a separate header, use pragma once and boost::throw_exception 2014-11-10 14:24:39 +04:00
Boris Rasin
6a224fa5e9 =add polymorphic_pointer_downcast function template 2014-11-09 00:02:44 +02:00
Peter Dimov
24d6ac1e87 Remove unnecessary includes from polymorphic_cast.hpp. 2014-06-11 14:38:48 +03:00
Antony Polukhin
a0922ab598 Remove lexical_cast, add polymorphic_cast.hpp, minor fixes 2014-06-09 12:36:42 +04:00