More D newb questions.
Me Here
p9e883002 at sneakemail.com
Tue May 6 22:30:17 PDT 2008
Janice Caron wrote:
> On 06/05/2008, Me Here <p9e883002 at sneakemail.com> wrote:
> > Hm. I'm not sure. Would this work now: f( [ a, b ] ); ?
>
> That's a red herring: Literal syntax has never been available to
> custom types. But if you wanted, you could always overload static
> opIndex(), and then you'd be able instead to do
>
> f( MyArray[ a, b ] );
So then, <i>if</i> a ~ b worked, then
f( MyArray( a ~ b ) );
would work? (Just a question:)
--
More information about the Digitalmars-d
mailing list