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
> 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.


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