diff options
author | Xiaoyi Zhang <zhangxy@google.com> | 2019-11-05 17:08:27 -0500 |
---|---|---|
committer | Xiaoyi Zhang <zhangxy@google.com> | 2019-11-05 17:08:27 -0500 |
commit | 8aedd597af6b38ddb7cd72f0101799cec9bf04e4 (patch) | |
tree | 827e2d9bb69dea54ed130abb0b542b3ef80df468 /googlemock/docs | |
parent | 54978626b40f75095e96222ea7a9f820f5fced44 (diff) | |
parent | 523ad489efc3a73dfbfdd5424c6ba518a3668593 (diff) | |
download | googletest-8aedd597af6b38ddb7cd72f0101799cec9bf04e4.tar.gz googletest-8aedd597af6b38ddb7cd72f0101799cec9bf04e4.tar.bz2 googletest-8aedd597af6b38ddb7cd72f0101799cec9bf04e4.zip |
Merge pull request #2548 from kuzkry:update-pump-manual
PiperOrigin-RevId: 278702531
Diffstat (limited to 'googlemock/docs')
-rw-r--r-- | googlemock/docs/pump_manual.md | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/googlemock/docs/pump_manual.md b/googlemock/docs/pump_manual.md index 10b3c5ff..cdf7c57d 100644 --- a/googlemock/docs/pump_manual.md +++ b/googlemock/docs/pump_manual.md @@ -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. It's a lot of repetitive, mechanical, and error-prone work. -Variadic templates and variadic macros can alleviate the problem. However, while -both are being considered by the C++ committee, neither is in the standard yet -or widely supported by compilers. Thus they are often not a good choice, -especially when your code needs to be portable. And their capabilities are still -limited. - -As a result, authors of such libraries often have to write scripts to generate -their implementation. However, our experience is that it's tedious to write such -scripts, which tend to reflect the structure of the generated code poorly and -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 experience is that it's tedious to write custom scripts, which tend to +reflect the structure of the generated code poorly and 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. + +This script may be useful for generating meta code, for example a series of +macros of FOO1, FOO2, etc. Nevertheless, please make it your last resort +technique by favouring C++ template metaprogramming or variadic macros. # Our Solution |