Faking Dependent Types in C++
It is possible to have some kind of dependent typing in C++ using templates. The "solution" isn't elegant or usable, but I found it mildly interesting so I'll try to explain it here. The C++ type system with templates is Turing complete, so that something like this can be done shouldn't be a surprise. The [...]