Boost::Any ported to D

Oskar Linde oskar.lindeREM at OVEgmail.com
Tue Sep 26 23:59:40 PDT 2006


Fredrik Olsson wrote:
> Perhaps a prefix is in order, in your example:
> (new Any).assign(d"char[] test"); // Dynamic
> (new Any).assign(s"char[] test"); // Static
> 
> And same for the new array literals (That I love).
> (new Any).assign(d[1,2,3]); // Dynamic
> (new Any).assign(s[1,2,3]); // Static
> 
> I guess no prefix would default to static as is?
> 
> 
> (And before you even think about going about to complain about choosing 
> 'd', and 's' as prefixes have in mind: I do not care if any other 
> character is used, if it is postfix instead, or whatere. It is the 
> functionality I want!)

There is already a postfix: []

"test"[] // Dynamic
"test" // Static

/Oskar



More information about the Digitalmars-d-announce mailing list