Можно ли получить доступ к параметру шаблона вне шаблона без typedef?

Простой пример:

template<typename _X> // this template parameter should be usable outside!
struct Small {
   typedef _X X; // this is tedious!
   X foo;
};

template<typename SomeSmall>
struct Big {
   typedef typename SomeSmall::X X; // want to use X here!
   SomeSmall bar;
   X toe;
};

Есть ли способ получить доступ к параметру шаблона X из Small без использования typedef в Small class?

9
задан Matthieu M. 13 September 2010 в 08:42
поделиться