Boost.Preprocessor
A preprocessor metaprogramming library in the C/C++ ecosystem that implements preprocessing-time data structures and iteration macros using pure macros. Its core mechanisms include deferred expansion and token pasting, and it is used to generate repetitive boilerplate code.
Timeline (last 90 days)
Boost.Preprocessor is the most representative preprocessor metaprogramming library in the C/C++ ecosystem.
Boost.Preprocessor implements a "preprocessing-time STL" in pure macros, including data structures such as sequences, tuples, and lists, as well as iteration macros like BOOST_PP_SEQ_FOR_EACH and BOOST_PP_REPEAT.
The core idea of Boost.Preprocessor is to concatenate numbered macro names via BOOST_PP_CAT and then use multiple expansion rounds to simulate loops.
Early implementations of Boost.Preprocessor supported up to 256 iterations by default.
The iteration limit of Boost.Preprocessor is usually determined by the maximum macro expansion depth the compiler allows.
Modern C++ prefers templates and constexpr over macro metaprogramming libraries like Boost.Preprocessor.
All Facts (6)
Boost.Preprocessor is the most representative preprocessor metaprogramming library in the C/C++ ecosystem.
50%UnverifiedBoost.Preprocessor implements a "preprocessing-time STL" in pure macros, including data structures such as sequences, tuples, and lists, as well as iteration macros like BOOST_PP_SEQ_FOR_EACH and BOOST_PP_REPEAT.
50%UnverifiedThe core idea of Boost.Preprocessor is to concatenate numbered macro names via BOOST_PP_CAT and then use multiple expansion rounds to simulate loops.
50%UnverifiedEarly implementations of Boost.Preprocessor supported up to 256 iterations by default.
50%UnverifiedThe iteration limit of Boost.Preprocessor is usually determined by the maximum macro expansion depth the compiler allows.
50%UnverifiedModern C++ prefers templates and constexpr over macro metaprogramming libraries like Boost.Preprocessor.
50%