Bug 13837 – Named tuples with type inference

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-12-08T22:22:00Z
Last change time
2015-02-18T03:40:41Z
Assigned to
peter.alexander.au
Creator
peter.alexander.au

Comments

Comment #0 by peter.alexander.au — 2014-12-08T22:22:54Z
Currently, you can name tuple parameters if you specify the types and names. alias Coord = Tuple!(float, "x", float, "y", float, "z"); auto c = Coord(1.0f, 2.0f, 3.0f); would be nice to be able to do: auto c = tuple!("x", "y", "z")(1.0f, 2.0f, 3.0f); and have the types inferred.
Comment #1 by peter.alexander.au — 2014-12-09T10:14:39Z
I've implemented this. Will do PR when I get home.
Comment #2 by peter.alexander.au — 2014-12-09T22:46:26Z
Comment #3 by github-bugzilla — 2014-12-11T14:58:04Z
Comment #4 by github-bugzilla — 2015-02-18T03:40:41Z