
Ask HN: Simple static type registry in C++17 - ebj73
I&#x27;m working on a side project where I&#x27;m also learning modern C++. As a part of the project I&#x27;ve created a static type registry class that I&#x27;m using for associating type names with types, and for instantiating types from type names. It&#x27;s part of my serialization logic.<p>It&#x27;s not big, but it seems to do what I need it to do, currently.<p>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?<p>https:&#x2F;&#x2F;github.com&#x2F;bjaastad&#x2F;simple-static-type-registry-cpp&#x2F;blob&#x2F;master&#x2F;simplestatictyperegistry.hpp
======
ebj73
Link to the code:

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

