I read book < C++ Templates - the Complete Guide > and learned template specialization for pointer. (maybe I misunderstand this part of the book)
(1) Here\'s my s
as you've been already told, partial specialization of function templates are not allowed. You can use std::enable_if for this:
template ::value>* = 0>
void func(T val) { std::cout << val << std::endl; }
template ::value>* = 0>
void func(T val) { func(*val); }
If you are looking for simpler syntax, wait for concepts