// Copyright (c) 2025-2026 Antony Polukhin // Copyright (c) 2025-2026 Fedor Osetrov // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include #include #include import boost.conversion; namespace { struct Base { virtual ~Base() = default; virtual std::string name() const { return "base"; } }; struct Derived : Base { std::string name() const override { return "derived"; } }; } int main() { std::cerr << boost::implicit_cast(42) << '\n'; std::unique_ptr base = std::make_unique(); std::cerr << boost::polymorphic_downcast(*base).name() << '\n'; return 0; }