Tuple!(string, int))[] field_orders

Andrea Fontana nospam at example.org
Thu Mar 14 15:58:21 UTC 2019


On Thursday, 14 March 2019 at 15:29:28 UTC, Ozan wrote:
> Hi
> In vibe.d / data / mongo / collection  I found the function
> * ensureIndex(Tuple!(string, int))[] field_orders)
>
> What could be the right way to use "Tuple!(string, int))[] 
> field_orders"?
> I tried different ways like [Tuple!("a", 1), Tuple!("b", 2)]", 
> but compiler said "No"
>
> Any hint?
>
> Thanks & Regards,
> Ozan

field_orders' type: Tuple!(string, int)[]

So you have to use [Tuple!(string, int)("b",2), ...]  or 
(shortcut) [tuple("b", 2), ...]



Andrea



More information about the Digitalmars-d-learn mailing list