www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: SFINAE

reply Jason House <jason.james.house gmail.com> writes:
Andrei Alexandrescu Wrote:
 
 I think conditional templates obviate most, if not all, of the need for 
 sfinae. 

Which is it? Most or all? If it's not all, what's missing?
 There need to be some more steps taken, most importantly 
 unification of regular functions with template functions.

Why would having or not having that change the need for SFINAE?
Oct 05 2008
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Jason House wrote:
 Andrei Alexandrescu Wrote:
  
 I think conditional templates obviate most, if not all, of the need for 
 sfinae. 

Which is it? Most or all? If it's not all, what's missing?
 There need to be some more steps taken, most importantly 
 unification of regular functions with template functions.

Why would having or not having that change the need for SFINAE?

I don't know; we haven't thought all of that through. Andrei
Oct 05 2008
parent Don Clugston <nospam nospam.com> writes:
Andrei Alexandrescu wrote:
 Jason House wrote:
 Andrei Alexandrescu Wrote:
  
 I think conditional templates obviate most, if not all, of the need 
 for sfinae. 

Which is it? Most or all? If it's not all, what's missing?
 There need to be some more steps taken, most importantly unification 
 of regular functions with template functions.

Why would having or not having that change the need for SFINAE?

I don't know; we haven't thought all of that through. Andrei

I've never seen any D code which used SFINAE. Why not simply disable it, see if anything breaks, and _then_ look for alternatives for anything which actually requires it? I strongly suspect that SFINAE is an obselete coding style in D. There's a decent chance that nobody is using it.
Oct 06 2008