digitalmars.D.learn - Tuple!(string, int))[] field_orders
- Ozan (10/10) Mar 14 2019 Hi
- Andrea Fontana (5/15) Mar 14 2019 field_orders' type: Tuple!(string, int)[]
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
Mar 14 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, Ozanfield_orders' type: Tuple!(string, int)[] So you have to use [Tuple!(string, int)("b",2), ...] or (shortcut) [tuple("b", 2), ...] Andrea
Mar 14 2019