I should probably qualify my bluster about all the code on this blog being C++14. While it is true that all of the code on this blog, unless otherwise specified, will be C++14, it is not likely that it will be properly displayed that way. I haven’t dug too deeply into it yet, but I don’t think the syntax-highlighting plugin I’m using supports C++14. In fact, I don’t think it even supports C++11.
datatypes” vocabulary, like
PDWORDLONG (lolwut?)… and while it looks like someone had the notion to squeeze in
char32_t after the fact, they seem to have forgotten about
(u)intN_t (and yes, I know those are not built-in types, but this “datatypes” vocabulary includes
mbstate_t, so clearly library data types up for grabs, too). The C++11 keywords appear to have been jammed in there, too (along with a bunch of other things that are not keywords in C or C++), and oddly “
whcar_t” is apparently a keyword (note the spelling; incidentally
wchar_t is already listed in the datatypes vocabulary). Then there is a “
functions” vocabulary that apparently lists every C89 function – including deprecated turds like
sprintf() – but not a single C++-only function, class, or variable (no
What I’m trying to say, in summary, is that it’s pretty terribad for a C++ syntax highlighter. My two year-old niece could do a better job with a source code printout and some Crayola markers.Which, to be clear, is not a knock on the syntax highlighter itself. It’s the C++ brush that sucks.
So at some point I’m either going to have to find a quality C++ brush to use with this plugin, or I’m going to have to roll my own. I’d like to do more than simply editing the list of strings in the various keyword vocabularies, too – I’d like to add some regexes to highlight numeric literals that can handle UDLs (there’s a
value class in the CSS that sounds about right, or perhaps
Those might be long-term plans, though. For the time being, I want to see how things look with real code in real posts, to get a better sense of the layout of things.
So if the syntax highlighting doesn’t look pretty at first, please bear with it.
Footnotes [ + ]
|1.||↑||Which, to be clear, is not a knock on the syntax highlighter itself. It’s the C++ brush that sucks.|