digitalmars.D.learn - std.variant and delegate
- Eyyub (5/5) Aug 02 2012 Hi,
- Namespace (3/8) Aug 02 2012 writeln(*vastr.get!(typeof(() => 42)));
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (8/19) Aug 02 2012 And these:
- Eyyub (2/22) Aug 02 2012 Thanks guys, this is so ugly that I didn't think to do that ! :P
Hi, std.variant with delegate seems to be buggy : http://dpaste.dzfl.pl/24a87b46 Why the output is not 42 ? Thx
Aug 02 2012
On Thursday, 2 August 2012 at 20:33:02 UTC, Eyyub wrote:Hi, std.variant with delegate seems to be buggy : http://dpaste.dzfl.pl/24a87b46 Why the output is not 42 ? Thxwriteln(*vastr.get!(typeof(() => 42))); prints 42 ;)
Aug 02 2012
On 08/02/2012 01:36 PM, Namespace wrote:On Thursday, 2 August 2012 at 20:33:02 UTC, Eyyub wrote:And these: a) auto f = vastr.get!(typeof(() => 42)); writeln(f()); b) writeln(vastr.get!(typeof(() => 42))()()); AliHi, std.variant with delegate seems to be buggy : http://dpaste.dzfl.pl/24a87b46 Why the output is not 42 ? Thxwriteln(*vastr.get!(typeof(() => 42))); prints 42 ;)
Aug 02 2012
On Thursday, 2 August 2012 at 20:36:53 UTC, Ali Çehreli wrote:On 08/02/2012 01:36 PM, Namespace wrote:Thanks guys, this is so ugly that I didn't think to do that ! :POn Thursday, 2 August 2012 at 20:33:02 UTC, Eyyub wrote:And these: a) auto f = vastr.get!(typeof(() => 42)); writeln(f()); b) writeln(vastr.get!(typeof(() => 42))()()); AliHi, std.variant with delegate seems to be buggy : http://dpaste.dzfl.pl/24a87b46 Why the output is not 42 ? Thxwriteln(*vastr.get!(typeof(() => 42))); prints 42 ;)
Aug 02 2012