3 ms·
In C++ it's less obvious, so while a private constructor does most of the job, it's still tricky to come up with a way of designing those types so they feel nat
by TeMPOraL 2y ago
In C++ it's less obvious, so while a private constructor does most of the job, it's still tricky to come up with a way of designing those types so they feel natural, are easy to construct in the right way (via appropriate parsers), impossible to construct the wrong way by accident, and fulfill all the roles people expect, and don't devolve into impenetrable mess of template metaprogramming that can only be debugged by the author of the type definition framework.