I admit. C++ Strong Duck , is a click bait title. Perhaps.
Please first make a slight detour into the direction of “Strong Type by Struct“.
I have released, a new version of my console app, to help you set up your Windows console to show UTF-8 text properly.
It is more comfortable. It also produces
syslog output, for the enterprise or data center situations.
No need. Please read this first. Continue reading “C++ lvalues, rvalues, glvalues, xvalues, making you leave the party?”
The “crown jewel” of the post first. I use standard C++ and this macro :
// guaranteed no evaluation
// guaranteed zero bytes overhead
// can be placed in any scope
#define DBJ_REMOVE(...) \
static_assert( (noexcept(__VA_ARGS__),true) )
Any number of any legal arguments works. In or out of functions. In or out a namespace. Yes it is a macro too.
That is runtime zero cost.
noexcept is compile time affair. And since the result is cast to “nothing” aka
void that compiles to exactly 0 bytes.
“… C++ is not a bad language per se. It’s just, well kinda suffers from bloat. In the words of Richard E. Gooch, “It seduces the programmer, making it much easier to write bloatware“…”