-
Notifications
You must be signed in to change notification settings - Fork 451
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
Register fixed size string array-like type #381
Comments
Looking through the docs I saw sequential_container_mapper, which btw is mostly the same documentation as the associative_container_mapper , so the info there is incorrect, however, looking at the header it refers to: I found the following line of code: template<typename T, std::size_t N>
struct sequential_container_mapper<std::array<T, N>> : detail::sequential_container_base_static<std::array<T, N>> {}; And while there is no specialization for the std::string type in this file, this is closer to what I'm trying to do. |
You can only register a property to a |
Yeah I know, that's why I was looking for a solution similar to a sequential container type, or a specialization for string like types |
you could make type erasure for your type? And then register the CStringRef with your property. |
I have a string class with constant storage to avoid memory allocations on strings I know their fixed size, the class is defined as:
If I try to register a class with a property member of this type then the compiler will complain about not finding the type associated to it:
'rttr::type::get': no matching overloaded function found
Since it's a templated class I can't use the normal registration API, is there a workaround for this? Perhaps specialize some type implementation detail?
The text was updated successfully, but these errors were encountered: