Ill-Advised C++ Rant, Part 2 (2016)
&gt; Calculating the size of a static array.<p><pre><code>  #include &lt;type_traits&gt;
  int myarray[] = { 4, 5, 6, 7, 8, 9 };
  int x = std::extent&lt;decltype(foo)&gt;::value;  &#x2F;&#x2F; returns 6
</code></pre>
&gt; Converting a string to an enum<p>Generally a bad idea, as it couples a protocol (whatever is feeding you the strings) to symbols in your language.  Often, one of those has constraints that the other cannot meet.<p>&gt; Binary file includes<p><pre><code>  objcopy -I binary -O elf64-x86-64 -B i386:x86-64:intel in.bin out.o
</code></pre>
Not the prettiest, but, why should a language do the linker&#x27;s job?<p>&gt; FourCC codes<p>How often does this come up, that you can&#x27;t write a 10-line class to do what you want?  Not to mention the obvious issue of endianness in the example given.  Last time I had to do this I was writing a PNG parser, which was not something I should have been doing.<p>&gt; Types as first-class primitives<p>I&#x27;ve been coding for 25 years and never needed nor wanted this.  I know not everyone agrees, but personally I find reliance on RTTI to be a code smell.  (Granted, pre-C++17 it&#x27;s kind of forced due to lack of a proper variant type.)<p>(I realize the above is opinionated, but… so is the OP! :)