You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
struct TestCopyableOnly final : rtti_helper<type_id_type<...>, TestBase>
{
using base = rtti_helper<type_id_type<...>, TestBase>::base; // TBD
explicit TestCopyableOnly(const char payload) : base(payload)) { ... }
Although, I'm not sure how it will better tune api of rtti_helper so that:
easier make the using base = ... declaration (without duplicating type id!)
support multiple inheritance (like struct DogCat : rtti_helper<type_id_type<...>, Dog, Cat> { ... }) while passing all (variadic?) arguments to at least the first base constructor (the Dog(some_args) one).
The text was updated successfully, but these errors were encountered:
The helper is expected to have limited applicability and every now and then you'll find that it doesn't suit your use case. I think amending its ctor such that it forwards the arguments to the first base is sensible but anything beyond that can be safely considered out of the scope (which is to say that in your Dog Cat example you can't use the helper unless Cat is default-constructible).
Not sure if there's a way to avoid restating the template parameters.
Currently, I have to write something like this to inherit from
TestBase
and have RTTI support:Ideally make it possible to write like this:
Although, I'm not sure how it will better tune api of
rtti_helper
so that:using base = ...
declaration (without duplicating type id!)struct DogCat : rtti_helper<type_id_type<...>, Dog, Cat> { ... }
) while passing all (variadic?) arguments to at least the first base constructor (theDog(some_args)
one).The text was updated successfully, but these errors were encountered: