Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Simple static type registry in C++17
1 point by ebj73 on March 30, 2020 | hide | past | favorite | 1 comment
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






Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: