18 Aug
2005
18 Aug
'05
7:12 p.m.
"Lisa Glendenning"
Is it possible to do something like
template <typename T> T* Access(int n) { return chain.component
(); } because my compiler (GCC) doesn't like it.
What version of GCC are you using? Have you tried
chain.template component
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