Boost logo

Boost Users :

Subject: Re: [Boost-users] zip_iterator documentation: probably malformed example
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2011-09-05 10:05:23

On 05.09.2011 12:30, Krzysztof Żelechowski wrote:
> Dave Abrahams wrote:
>> on Sat Sep 03 2011, Krzysztof Żelechowski<>
>> wrote:
>>> At
>>> [
>>> 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''.
If you hadn't inserted the example code into a function where zip_it is
of dependent type, but instead is an instance of some concrete class,
the error wouldn't have appeared.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at