#include <iostream> template<typename T> struct Outer { template<typename U> struct Inner { template<typename V> static void nested_static() { std::cout << "Outer<T>::Inner<U>::nested_static<V>\n"; } template<typename V> void nested_instance() { std::cout << "Outer<T>::Inner<U>::nested_instance<V>\n"; } }; }; template<typename T, typename U, typename V> void test(typename Outer<T>::template Inner<U> &inner) { inner.template nested_instance<V>(); Outer<T>::template Inner<U>::template nested_static<V>(); } int main() { Outer<char>::Inner<short> inner; test<char, short, int>(inner); }


나는 typename, ::template, .template 앞에 붙여야 하는 경우였던거 같다

내가 쓰기도 짜증나고 남이 쓰는거 읽었을때 눈에 존나 안들어옴...