C++
03
Added in Boost
1.38.0
Categories:
Patterns
Design pattern to manage large quantities of highly redundant objects.
This Release
Joaquin M. López Muñoz
Joaquin M. López Muñoz
Author
Alexander Grund
Alexander Grund
Contributor - New
Dependencies
Assert
Config
Container Hash
Core
Detail
Interprocess
MPL
Multi-Index
Parameter
Preprocessor
Smart Ptr
ThrowException
Type Traits
Unordered
Boost.Flyweight
Header-only libraryBranch CI Drone status Deps Documentation Enter the Matrix
Branch CI Drone status Deps Documentation Enter the Matrix
BSL 1.0
Flyweights are small-sized handle classes granting constant access to shared common data, thus allowing for the management
of large amounts of entities within reasonable memory limits. Boost.Flyweight makes it easy to use this common programming
idiom by providing the class template flyweight<T>
, which acts as a drop-in replacement for const T
.
Learn about Boost.Flyweight
Install Boost.Flyweight
- Download Boost and you're ready to go (this is a header-only library requiring no building).
- Using Conan 2: In case you don't have it yet, add an entry for Boost in your
conanfile.txt
(the example requires at least Boost 1.86):
[requires]
boost/[>=1.86.0]
- If you're not using any compiled Boost library, the following will skip building altogether:
[options]
boost:header_only=True
- Using vcpkg: Execute the command
vcpkg install boost-flyweight
- Using CMake: Boost CMake support infrastructure allows you to use CMake directly to download, build and consume all of Boost or some specific libraries.
Support
- Join the #boost discussion group at cpplang.slack.com (ask for an invite if you’re not a member of this workspace yet)
- Ask in the Boost Users mailing list
(add the
[flyweight]
tag at the beginning of the subject line) - File an issue
Contribute
- Pull requests against develop branch are most welcome. Note that by submitting patches you agree to license your modifications under the Boost Software License, Version 1.0.
All Time
Beman Dawes
Beman Dawes
Contributor
Rene Rivera
Rene Rivera
Contributor
Peter Dimov
Peter Dimov
Contributor
Marshall Clow
Marshall Clow
Contributor
Troy D. Straszheim
Troy D. Straszheim
Contributor
fanquake
fanquake
Contributor
Stephen Kelly
Stephen Kelly
Contributor
Edward Diener
Edward Diener
Contributor
Daniel James
Daniel James
Contributor
Giovanni Mascellani
Giovanni Mascellani
Contributor
Andrey Semashev
Andrey Semashev
Contributor
Bryce Adelstein-Lelbach
Bryce Adelstein-Lelbach
Contributor
Tinko Bartels
Tinko Bartels
Contributor
Douglas Gregor
Douglas Gregor
Contributor