Reimplementing the bulk of std.meta iteratively

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Sep 26 21:42:19 UTC 2020


On 9/26/20 5:16 PM, Timon Gehr wrote:
> On 26.09.20 18:18, Andrei Alexandrescu wrote:
>>
>> Most implementations are a few lines long because they get to leverage 
>> algorithms as implemented in std. Here's a typical one:
>>
>> alias MostDerived(Args...) = dereify!({
>>      auto ids = reify!Args;
>>      sort!((a, b) => is(dereify!a : dereify!b))(ids);
>>      return ids;
>> }());
> 
> I am pretty sure this one does not work though.

Oops, Steve just told me it doesn't have any unittests. So it may as 
well not be working. Research goes on.


More information about the Digitalmars-d mailing list