In our last exciting episode Markus Werle wrote:

> With enable_if this can be reduced to say it once and for all times:
> Users just have to specialize a traits class

> template <class T> struct DaixtroseTraits
> {
>   enum { use_default_ops = false };
> };

> and I change my operators to

> template <class T1, class T2
> enable_if
> <
>  (
>   (DaixtroseTraits<T1>::use_default_ops == true)
>   &&
>   (DaixtroseTraits<T2>::use_default_ops == true)
>   ),
>   SomeComplicatedType 
> >::type
> operator+(T1 const &, T2 const &);

> and move them from namespace Daixtrose::Defaultops to namespace Daixtrose.
> What do You think? Did I miss any side effects?

I don't think you missed anything. That's the way it works, and it is
what we've been using in an ET-capable library for a while. 

  Cheers, Jaakko

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to