Boost logo

Boost Users :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-08-18 14:12:29


"Lisa Glendenning" <lisa_at_[hidden]> wrote in message
news:1124320594.18856.24.camel_at_jenkins.tsasa.lanl.gov...
> Is it possible to do something like
>
> template <typename T>
> T* Access(int n) {
> return chain.component<n, T>();
> }
>
> because my compiler (GCC) doesn't like it.

What version of GCC are you using? Have you tried

   chain.template component<n, T>();

?

> And if not, then how can I
> access a component without knowing at compile time its index?

That's a good point. The index probably should have been a runtime value. This
was a feature I added after review, and I never solicited comments on it.

Jonathan


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