Hi! A little mistake during copy/paste. :)
 
 template < typename T, int S >
 class A{
 
 public:
 T _V[S ];
 int a;
 }
 
 template < typename T >
 class B : public A< T, 2 /* const */ >
 {
 B( T t ) : A<T,2 >::V[0]( t ), A<T, 2>::V[1] ( t ) /* ERROR reported by
 compiler. Why? */
 , a( 1 ) /* no error */ {};
 
 B( T t1, T t2 ){
 A<T,2>::V[0] = t1; // no error.
 }

 };
 
 It apears that index operator [] is not treated properly during initialization.

Reply via email to