-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider adding a way to get type names as compile-time strings #265
Comments
Let me note the two main issues with CTTI type IDs above:
Hope it helps. |
Probably it could be more useful to just use the implementation from Boost.TypeIndex https://github.com/apolukhin/type_index/tree/constexpr14. constexpr14 branch will be merged to develop right after the 1.61 release. Then all you need to do is to include this header boost/type_index/ctti_type_index.hpp |
@ldionne If boost will support a similar feature, I agree with Antony, just pick it from Boost.TypeIndex instead of reinventing the wheel. @apolukhin we have an open feature idea of having cross-platform type IDs, maybe parsing names to get a common representation (MSVC for example prepends static std::unique_ptr<BaseClass> getInstance(const std::string& name)
{
return types[name].create(...);
} We thought about processing type names given by Have you considered this, and if so, advanced in some way? |
As done in ctti.
The text was updated successfully, but these errors were encountered: