template < int ...Indices>
class T1 {
template <int _1, int _2>
class T2;
};
template <int ...Indices>
template <int _1>
class T1<Indices...>::T2<_1, sizeof...(Indices)> {};
//^--error: non-type template argument depends on a template parameter of the partial specialization
은 gcc 4.5 이상에서 컴파일되지만 clang 3.1 및 icc에서는 모두 sizeof...(Indices)
의 사용법에 대해 불평하지 않습니다. 후자의 컴파일러 또는 일부 특수한 경우에 아직 구현되지 않은 기능입니까?둘러싸인 템플릿 매개 변수에 따라 중첩 된 템플릿 전문화
감사합니다,
Buote
해당 컴파일러의 버그처럼 보입니다. 가능한 경우,'T1'의'class {}'블록 안에 중첩 된 템플릿을 정의 해보십시오. 필요할 경우 별도의 멤버 템플릿을 위임 할 수도 있습니다. – Potatoswatter