TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

1 点作者 ebj73大约 5 年前
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

ebj73大约 5 年前
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>