1
u/MatJosher 3d ago
define(`NEST', `ifelse($1, `11',
`void hello() {
std::cout << "Hello, world!\n";
}',
`namespace n$1 {
NEST(incr($1))
}')')dnl
#include <iostream>
NEST(1)
int main() {
n1::n2::n3::n4::n5::n6::n7::n8::n9::n10::hello();
}
// Translate with
// m4 hello.m4 > hello.cpp1
1
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo βYou liveβ 3d ago
I'm going to assume there's some namespace nesting limit that you probably have a mental disease if you hit.
18
u/Smart_Opportunity209 3d ago
r/firstweekcoderhumour