I think it depends on the target data model. You're right for any system where int is 32 bits wide, but if you're on an ILP64 data model (e.g. SPARC64 or certain old Cray systems), it'll take significantly longer.
I thought we were focusing on the horrible idea to not put a newline after the opening brace but before the closing brace anyway - but yeah that's bad too, I guess.
52
u/apadin1 Dec 04 '19
You should see how long it takes to compile IsOdd<2147483647>{}()
12
u/[deleted] Dec 04 '19
The same thing in a little shorter: https://godbolt.org/z/krbjX5
88
u/SpecialEmily Dec 04 '19
'''bool operator()() { return 5;'''
Wat
5
u/littleswenson Dec 04 '19
Cries in return 5
2
u/[deleted] Dec 05 '19
bool isEven(int i) { return !(i & 1) }