Boost::Any ported to D

Oskar Linde oskar.lindeREM at OVEgmail.com
Wed Sep 27 07:18:22 PDT 2006


Fredrik Olsson wrote:
> Oskar Linde skrev:
>> Fredrik Olsson wrote:
>>> Perhaps a prefix is in order, in your example:
> <snip>
>> There is already a postfix: []
>>
>> "test"[] // Dynamic
>> "test" // Static
>>
> 
> Ah, stupid of me. I like it.
> 
> But where is this documented? I can not find any mention about it under 
> StringLiterals, and ArrayLiterals under expressions.

Not very well documented, but:

http://www.digitalmars.com/d/expression.html

"""
SliceExpression:
	PostfixExpression [ ]
	PostfixExpression [ AssignExpression .. AssignExpression ]
"""

The first form is the full slice. It seems to be missing from

http://www.digitalmars.com/d/expression.html#SliceExpression

though.

/Oskar



More information about the Digitalmars-d-announce mailing list