Boost logo

Boost Users :

Subject: Re: [Boost-users] zip_iterator documentation: probably malformed example
From: Krzysztof Żelechowski (giecrilj_at_[hidden])
Date: 2011-09-05 06:30:34


Dave Abrahams wrote:

>
> on Sat Sep 03 2011, Krzysztof Żelechowski <giecrilj-AT-stegny.2a.pl>
> wrote:
>
>> At
>> [http://www.boost.org/doc/libs/1_47_0/libs/iterator/doc/zip_iterator.html
>> Zip Iterator]:
>>
>> is:: {{{zip_it->get<0>() = 42.0;}}} (syntax error)
>> works:: {{{zip_it -> template get <0> () = 42.0;}}}
>
> Not a bug, IMO. There's no reason to think we're writing in a template
> here, and I see no reason to complicate the example by making that
> assumption.
>

GNU C++ treats the sample code as a syntax error. Template member functions
should be called preceded with the template keyword. I do not understand
what you mean by ''writing in a template''.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net