Talk #1672
Template Metaprogramming
100%
Description
One can do much more with C++ templates than most realise, as the template system itself happens to be Touring-complete. Using this language within C++ it is possible to move some executions from runtime to compile time, possibly reducing runtime and moving error checks to take place during compilation.
In this talk we will look at how to use the template system to carry out simple calculations during compilation. We will also scratch the surface of boost's metaprogramming library (MPL) which provides a lot of useful metafunctions and metaclasses to facilitate programming with templates.
Files
Updated by Glesaaen, Jonas almost 9 years ago
- File template_meta_programming.pdf template_meta_programming.pdf added
- File template_meta_programming_w_notes.pdf template_meta_programming_w_notes.pdf added
- % Done changed from 0 to 100
- Talk Author(s) set to Glesaaen, Jonas
- Presenter set to Glesaaen, Jonas
One can do much more with C++ templates than most realise, as the template system itself happens to be Touring-complete. Using this language within C++ it is possible to move some executions from runtime to compile time, possibly reducing runtime and moving error checks to take place during compilation.
In this talk we will look at how to use the template system to carry out simple calculations during compilation. We will also scratch the surface of boost's metaprogramming library (MPL) which provides a lot of useful metafunctions and metaclasses to facilitate programming with templates.