
On 08/04/11 17:05, Gennadiy Rozental wrote:
This will not really work for me. This was just an artificial example. In reality I have generic header which defines the template, another common header which defines some not very specific specialization and multiple (number changes as project grows) headers where I define more specific specializations. I can't "NOT" all the specific conditions in "scalar" level specialization - It's just not maintainable.
Any other options?
- have a first level function enable_if on the highest catching metafunction then do tag dispatching inside to other function enabled_if on specialization of said initial test. - build sensible, non overlapping traits for your cases and use these instead of raw type traits. enable_if cant work with overlapping conditions.