Macro Rules at Home
Me: Mom, can I have macro_rules! yo { ($name:expr) => { println!("Yo {}!", $name); }; } ? Mom: No, we have macro_rules! at home. macro_rules! at home: template<typename... Args> class tuple { consteval { int n = 0; for (meta::info t : {reify(Args)...}) { meta::info frag = <class { typename |%t| {#"mem_" + % {std::to_string(n++)}#|; }>; -> frag; } } };
The meme uses the “Mom, can I have X? We have X at home” format. A child asks for Rust’s `macro_rules!`, but the mother offers an absurd and overly complicated C++ template-metaprogramming substitute instead. EN: The meme uses the “Mom, can I have X? We have X at home” format. A child asks for Rust’s `macro_rules!`, but the mother offers an absurd and overly complicated C++ template-metaprogramming substitute instead.
- @profunctor_io / 5253 2020-09-03
- Template
- We Have X at Home
- Type
- image
- Size
- 541×625 · 39.7 KiB
- Mood
- sarcastic, absurd
- Language
- en
- Added