update pump_manual.md

This commit is contained in:
Krystian Kuzniarek 2019-11-02 01:08:24 +01:00
parent e8a82dc7ed
commit 523ad489ef

View File

@ -6,18 +6,15 @@ Template and macro libraries often need to define many classes, functions, or
macros that vary only (or almost only) in the number of arguments they take. macros that vary only (or almost only) in the number of arguments they take.
It's a lot of repetitive, mechanical, and error-prone work. It's a lot of repetitive, mechanical, and error-prone work.
Variadic templates and variadic macros can alleviate the problem. However, while Our experience is that it's tedious to write custom scripts, which tend to
both are being considered by the C++ committee, neither is in the standard yet reflect the structure of the generated code poorly and are often hard to
or widely supported by compilers. Thus they are often not a good choice, read and edit. For example, a small change needed in the generated code
especially when your code needs to be portable. And their capabilities are still may require some non-intuitive, non-trivial changes in the script. This is
limited. especially painful when experimenting with the code.
As a result, authors of such libraries often have to write scripts to generate This script may be useful for generating meta code, for example a series of
their implementation. However, our experience is that it's tedious to write such macros of FOO1, FOO2, etc. Nevertheless, please make it your last resort
scripts, which tend to reflect the structure of the generated code poorly and technique by favouring C++ template metaprogramming or variadic macros.
are often hard to read and edit. For example, a small change needed in the
generated code may require some non-intuitive, non-trivial changes in the
script. This is especially painful when experimenting with the code.
# Our Solution # Our Solution