#include <type_traits>

template<class T>
void func(T arg) {
  static_assert(!std::is_pointer<T>::value, "The argument to func must not be a pointer.");
}

int main() {
  int i = 2;
  func(i);
  func(&i);
}