TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Simple static type registry in C++17

1 pointsby ebj73about 5 years ago
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

1 comment

ebj73about 5 years ago
Link to the code:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;bjaastad&#x2F;simple-static-type-registry-cpp&#x2F;blob&#x2F;master&#x2F;simplestatictyperegistry.hpp" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bjaastad&#x2F;simple-static-type-registry-cpp&#x2F;...</a>