HACKER Q&A
📣 ebj73

Simple static type registry in C++17


I'm working on a side project where I'm also learning modern C++. As a part of the project I've created a static type registry class that I'm using for associating type names with types, and for instantiating types from type names. It's part of my serialization logic.

It's not big, but it seems to do what I need it to do, currently.

Can someone with a deeper C++ knowledge take a quick look at it, and see if there are any obvious mistakes in my current approach to this problem?

https://github.com/bjaastad/simple-static-type-registry-cpp/blob/master/simplestatictyperegistry.hpp


  👤 ebj73 Accepted Answer ✓