Ary Borenszweig:
As a library solution I would do something like this:Union!(int, string)[] elements; elements ~= 1; elements ~= "hello";
Take a look at Algebraic in Phobos. Bye, bearophile
bearophile via Digitalmars-d-learn Mon, 23 Jun 2014 15:00:53 -0700
Ary Borenszweig:
As a library solution I would do something like this:Union!(int, string)[] elements; elements ~= 1; elements ~= "hello";
Take a look at Algebraic in Phobos. Bye, bearophile