TDPL: Overloading template functions

Brad Roberts braddr at puremagic.com
Fri Jul 30 12:07:59 PDT 2010


On Fri, 30 Jul 2010, Andrej Mitrovic wrote:

> Speaking of which, I think there's a typo in Phobos docs:
> 
> http://www.digitalmars.com/d/2.0/phobos/std_typecons.html
> 
> Tuple!(int, int) point;
> // assign coordinates
> point.field[0] = 5;
> point.field[1] = 6;
> // read coordinates
> auto x = point.field[0];
> auto y = point.[1];
> 
> The last one should be "auto y = point.field[1]"

Fix submitted to svn.


More information about the Digitalmars-d mailing list