I learnt that under certain conditions, pointers can also be non-type template parameters. Then I wrote the following program that compiles with msvc but not with gcc and clang. Live Demo
template<typename T, T*>
struct S{};
int main() {
S<int, (int*)2> s4; //msvc compiles this while gcc and clang reject this
}
As we can see, the program works with msvc but not with gcc and clang and I don't know which compiler is correct here as per the C++ standard.
Note this is purely for academic purposes.