Type functions with std.algorithm
Stefan Koch
uplink.coder at googlemail.com
Sun Oct 11 15:46:19 UTC 2020
On Sunday, 11 October 2020 at 13:49:20 UTC, Stefan Koch wrote:
>
> So all I have to do is to teach that the type of any type is
> __type.
>
> And then everything will work!
Turns out that is not the case now array fails with:
phobos/std/conv.d(4529): Error: constructor
std.conv.emplaceRef!(__type, __type,
__type).emplaceRef.S.this(ref __type _param_0) is not callable
using argument types ((__type))
I believe this is an implicit conversion problem ...
Seriously how complicated is phobos ... all you need to do is a
foreach loop.
What does std.conv.emplaceRef have to do with it?
remember the code I want to compile is:
---
import std.algorithm;
import std.range;
enum type[] types = makeTypeArray(int, uint, long, ulong);
enum size4 = types.filter!((type a) { return a.sizeof == 4; }
).array;
---
and now I worrying about std.conv.emplaceRef ?
More information about the Digitalmars-d
mailing list