I cannot compile your sample with my host compiler:
$ g++ my.cpp
my.cpp:11: error: ‘cls::nest’ is not a type
my.cpp:11: error: too many template-parameter-lists
Or:
$ clang -std=c++11 my.cpp
my.cpp:11:14: error: expected a class or namespace
void cls::nest::bar(V x) {}
~~~~~~~~^
1 error generated.