tuple of delegates requires explicit type

DigitalDesigns DigitalDesigns at gmail.com
Wed Jun 20 11:43:52 UTC 2018


alias f = void delegate();
Tuple!(f)[] fs;

fs ~= tuple(() { });

fails but

fs ~= Tuple!(f)(() { });

passes.
in tuple, it is seeing the lambda as void and thinks I'm trying 
to append a tuple of void. I don't see why the compiler can't see 
that it works.



More information about the Digitalmars-d mailing list