Project details here.
This project implements functionality from Scrap Your Boilerplate: A Practical Design Pattern for Generic Programming
, Lammel, Peyton-Jones, 2003.
The paper can be found here.
Scrap Your Boilerplate
creates generic traversals over data types. Users identify a target type and provide a function that accepts
the identified type as an input parameter. sybpp
computes, at compile-time, the generic traversal code. This removes the need for
users to implement "boilerplate" data structure traversal code (a visitor pattern) in order apply a function.
Users are required to wrap data types sybpp
encounters with the BOOST_FUSION_ADAPT_STRUCT
macro. Review the demo.cpp
file for
code examples.
Boost Software License 1.0
- everywhere
- one-layer traversal
- recursive traversal
- queries
- transform
- functions, functors, std::bind, lambdas supported
- STL container types
- supports std::variant, std::tuple, std::pair, std::optional
Hartmut Kaiser for suggesting this paper.
Christopher Taylor
- C++17
- Boost.Fusion