Fallback 'catch-all' template functions

Manu via Digitalmars-d digitalmars-d at puremagic.com
Thu Sep 1 03:25:53 PDT 2016


On 1 September 2016 at 19:16, Stefan Koch via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On Thursday, 1 September 2016 at 09:08:31 UTC, Manu wrote:
>>
>>
>> This was my fallback plan, but it seems a bit shit.
>
>
> Hmm I get your point.
> But there is not really another way within the current langauge.
> Also overloading lot of templates with templates constraints will eat into
> your compile-time!

I know, but it's core language feature of D! Basically every function
in the std library has some constraints. It's critical for anything
range based...
Perhaps if concepts existed, it might be a more direct and less
computationally intensive mechanism to deal with it. I've been feeling
like that'd really simplify the situation a lot for quite a few years
now.


More information about the Digitalmars-d mailing list