#include <vector> template<class Type> struct S; void foo(){ std::vector<std::vector<int>> a; auto iter = a.begin(); S<decltype(iter)> b;}
Standard input is empty
prog.cpp: In function ‘void foo()’: prog.cpp:9:22: error: aggregate ‘S<__gnu_cxx::__normal_iterator<std::vector<int>*, std::vector<std::vector<int> > > > b’ has incomplete type and cannot be defined S<decltype(iter)> b; ^
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!