-
Notifications
You must be signed in to change notification settings - Fork 48
home
Brigand is a light-weight, fully functional, instant-compile time C++ 11 meta-programming library.
Meta-programming libraries are extremly useful to library authors as they enable them to deliver more features with less code. They also find application in projects where performance and productivity are important.
Here are a couple of ideas:
- Create a tuple from a list of types and then transform it into a variant
- Look for the presence of a type in a tuple and get its index
- Sort a list of types
- Advanced static assertion with arithmetics and complex functions
- Go through a list of time and perform a runtime action for each type
- And much more
Long story short: everything you could do with Boost.MPL, you can do it with Brigand, except it requires less code and compiles much faster.
- [Introduction]
Work in progress
For further information, read the full reference documentation.
- Simple, focused and powerful
- Support a wide range of compilers and platforms, including the two latest release of Visual Studio
- Instant-compilation, no more excuse for getting an espresso!
- clang 3.4 and upward
- GCC 4.8 and upward
- Visual Studio 2013 Update 4 and upward
Brigand was born out of the need to replace the venerable, but aging, Boost.MPL in quasardb.
Because we may not have on all platforms a compiler capable of supporting Hana, and after reading Peter Dimov's Simple C++ 11 metaprogramming article (as well as Eric Niebler's Tiny Metaprogramming Library) I realized the amount of work to write a fully-functional MPL was manageable.
Joel told me that, at Numscale, they had exactly the same problem than us and Brigand was born.
Quel canaillou ce brigand.
We'd like to thank the following contributors:
- Odin Holmes
- Marek Kurdej
- Jonathan Poelen
Brigand is copyright Edouard Alligand and Joel Falcou and distributed under the Boost Software License version 1.0.