hot take: if C++ was truly committed to zero cost abstractions, functions would have opt-in reentrancy, the same way classes have opt-in vtables
-
Show this thread
-
Replying to @whitequark
just add some instructions at the top that clearly UB when entering twice and sneak it into the compiler benchmarks. compiler devs will do what compiler devs do.
2 replies 0 retweets 10 likes -
Replying to @rrika9 @whitequark
{ static signed char foo = 126; foo++; // this moves bar off the stack int bar; ... foo--; }
2 replies 0 retweets 7 likes -
Replying to @rrika9 @whitequark
Move foo++ in the constructor of a local object and foo-- in the destructor and yell "zero cost abstraction" three times... it's for a compiler benchmark after all. :)
2 replies 0 retweets 2 likes
"zero cost abstraction" is the "no copyright intended" of c++ development.
3:43 AM - 26 Mar 2020
0 replies
0 retweets
3 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.