
"Andy Little" <andy@servocomm.freeserve.co.uk> wrote
For each type, typeof registration is quite a heavyweight process,
so I want to only register those types that I Really need to. Currently this is not
so I get for example mpl::math::zero, mpl::math::denominator, etc etc, etc, etc and the kitchen sink registered for me though I dont need registration for
Why is it heavyweight? Registering a type is just creating a couple of template specializations -- that's it. the case the
vast majority of these types, also bearing in mind that space in the Typeof vector is limited,
What do you mean by the "space in the typeof vector"? How is it related to the number of registered types?
so I dont think registering everything is a practical way to do it.
What do you mean by everything? I would recommend registering types and templates that can be present in the types used by your users.
It must be possible for me the user to be able to register each type separately (only if it becomes necessary.) Of coures the problem comes then because mpl works in terms of concepts rather than type-names, so I might get a int_, a integral_c, or a long_. , a rational or a simplified_rational. I dont really know a clean solution to the problem of what to register if I use mpl, (maybe 'per concept registration would be OK) but I dont think registering everything at one go is a good solution.
I would register your own types/templates leaving mpl types/templates to either mpl authors or users. Then again, you could wear an mpl hat and register its types, but I don't think this should become a part of your library. Regards, Arkadiy