C++ class generator for value-semantics based types