Boost::Any ported to D

Marcin Kuszczak aarti at interia.pl
Wed Sep 27 12:00:09 PDT 2006


Oskar Linde wrote:

> 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

Postfix form works well, opposite to prefix form which doesn't...

-- 
Regards
Marcin Kuszczak
(Aarti_pl)



More information about the Digitalmars-d-announce mailing list