This Space for Rent

Trivial new code!

I’ve been shovelling a few little feature requests (from github, which has a rudimentary issue tracker built into it. Rudimentary, yes, but it organizes them and keeps them out of my local mailbox) into discount over the past week, and finally got around to looking at a feature request for C++ integration. The original request was to tweak mkdio.h so that it could be called from inside a C++ program, but some other people piped in saying that it would be nicer to have a RAII-style wrapper instead.

There are very few things that C++ does that I find interesting (I like operator overloading, but it’s basically a toy) but automagically calling deallocators when an object dies (“goes out of scope”) is one of them. So, after spending half an hour, mkdio.h++ (and a trivial program that uses one of the objects defined therein) which implements a MMIOT class (named MKIOT) and a subclass for github-flavo(u)red markdown.

It works on my mac (macos(x) 10.12.4) so it might work on any other machine that uses clang++ (and possibly g++, since clang tries to be gcc’s more obsessively-compulsive clone?) Try it out; it might not spontaneously create a quantum black hole and pop your workstation into another dimension.