Registry / utility / boost-type-erasure

boost-type-erasure

JSON →
library1.90.0vcpkgunverified

Boost type_erasure module provides runtime polymorphism through type erasure.

vcpkg install boost-type-erasure
INSTALL
IMPORT
SIG · BOOST-TYPE-ERASURE
B
boost-type-erasure
utilitycppv1.90.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

boost/type_erasure/any.hpp
#include <boost/type_erasure/any.hpp>

Type-erased object with streaming support

#include <boost/type_erasure/any.hpp> #include <boost/type_erasure/operators.hpp> #include <iostream> using namespace boost::type_erasure; struct Drawable : copy_constructible<>, ostreamable<> {}; struct Circle { void draw() const { std::cout << "Circle"; } }; int main() { any<Drawable> d = Circle(); std::cout << d << std::endl; return 0; }
Debug
Known issues
gotchaBoost.TypeErasure may have performance overhead compared to virtual functions; use judiciously.
fix
Profile your application to ensure type erasure is not a bottleneck.
affects: *
Upgrade
Version history
1.90.0latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Meta
1
Resources

No resource links recorded.

boost-type-erasure — pip install boost-type-erasure · libregistry