Boost logo

Boost Users :

From: Jaakko Järvi (jarvi_at_[hidden])
Date: 2006-12-04 23:10:03


On Dec 4, 2006, at 6:28 PM, Mark Ruzon wrote:

> The documentation for tuple says there are no portability problems
> with
> gcc 2.95. I am using 3.2.3 and am getting a syntax error on the
> line that
> does the work of this function object:
>
> #include <boost/tuple/tuple.hpp>
>
> struct get_0_func {
> template <typename II> // II models Input Iterator on tuple
> void operator()(II it) { it->get<0>(); }

try :

   void operator()(II it) { it->template get<0>(); }

Not tested, but this is likely the reason. The compiler does not how
yo parse < between get and 0, if not told
that get is a template.

   Jaakko Järvi

> };
>
> The boost::get<0>(*it) form works fine. Does anyone know why a newer
> version of gcc would not compile this?
>
> Mark
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


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