Boost logo

Boost Users :

Subject: Re: [Boost-users] enable_if and multiple partial specializations
From: Joel Falcou (joel.falcou_at_[hidden])
Date: 2011-04-08 11:04:44


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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net