...one of the most highly
regarded and expertly designed C++ library projects in the
world. — Herb Sutter and Andrei
Copyright © 2011-2013 Steven Watanabe
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)
Table of Contents
The Boost.TypeErasure library provides runtime polymorphism in C++ that is more flexible than that provided by the core language.
C++ has two distinct kinds of polymorphism, virtual functions and templates, each of which has its own advantages and disadvantages.
The Boost.TypeErasure library combines the superior abstraction capabilities of templates, with the runtime flexibility of virtual functions.
Boost includes several special cases of this kind of polymorphism:
boost::anyfor CopyConstructible types.
boost::functionfor objects that can be called like functions.
Boost.TypeErasure generalizes this to support arbitrary requirements and provides a predefined set of common concepts
Last revised: August 11, 2020 at 15:02:42 GMT