case of template member function specialization that compiles on msvc, not others
问题 [ EDIT ] I changed the title from works to compiles since it turns out that it doesn't truly work after all (thanks @bogdan for the comments). I added code at the end of the post showing why and how. The second part of the question still stands - is there a way to " fix " it? The crux of the matter is having a virtual function Observe in a base template<int N> class X be rerouted to a templated function Observe<N> in classes derived from X<N> , without requiring any supporting code in X . For