C++ template name mangling

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Fri Aug 15 15:15:01 PDT 2014


On Fri, Aug 15, 2014 at 03:00:33PM -0700, Walter Bright via Digitalmars-d wrote:
> On 8/15/2014 2:02 PM, H. S. Teoh via Digitalmars-d wrote:
> >What would interfacing with C++ templates be like in practice?
> 
> Don't really know. It's more like try it out and see what we can do.
> Clearly, for someone to use this effectively, they'd have to be comfortable
> with both C++ templates and D templates (cough, Andrei, cough) but it could
> be a real enabler for such programmers.
> 
> 
> >C++ templates have SFINAE, but D doesn't; so how would one translate a set
> >of C++ templates that rely on SFINAE to the equivalent D declarations
> >(inside extern(C++) blocks)?
> >
> >I hope we won't need to add SFINAE to extern(C++) blocks...
> 
> Yeah, SFINAE seems clearly out of the question.

On that note, opDispatch unfortunately appears to have SFINAE... or
behaves as though it has SFINAE:

	https://issues.dlang.org/show_bug.cgi?id=8387

This problem was reported back in 2012 and has had at least 4 duplicates
filed for it. It would be *really* nice if we could finally squash this
bug. (I wish I knew dmd internals well enough to do it myself... but I'm
still trying to find the time to work on the ambiguous inner scope
mangling problem.)


T

-- 
What do you call optometrist jokes? Vitreous humor.


More information about the Digitalmars-d mailing list