mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
parent
9ac22abe0a
commit
dbe8bf0207
|
@ -17765,7 +17765,7 @@ The syntax and techniques needed are pretty horrendous.
|
|||
##### Reason
|
||||
|
||||
Template metaprogramming is hard to get right, slows down compilation, and is often very hard to maintain.
|
||||
However, there are real-world examples where template metaprogramming provides better performance that any alternative short of expert-level assembly code.
|
||||
However, there are real-world examples where template metaprogramming provides better performance than any alternative short of expert-level assembly code.
|
||||
Also, there are real-world examples where template metaprogramming expresses the fundamental ideas better than run-time code.
|
||||
For example, if you really need AST manipulation at compile time (e.g., for optional matrix operation folding) there may be no other way in C++.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user