Re:C++26 is done ISO C++ standards meeting, Trip Report
by menaerus on Monday March 30, 2026 @01:46PM
(#47577424)
No, they are not.
[ Parent
| on HN ]
Re:C++26 is done ISO C++ standards meeting, Trip Report
by aw1621107 on Monday March 30, 2026 @02:49PM
(#47578176)
They are both; there are things that Rust's macros can do metaprogramming-wise that C++ templates cannot do and vice-versa.
Rust's macros work on a syntactic level, so they are more powerful in that they can work with "normally" invalid code and perform token-to-token transformations (and in the case of proc macros effectively function as compiler extensions/plugins) and less powerful in that they don't have access to semantic information.