#include <iostream>
void func(int * const &) {}
void func(int *) {}

template <typename T> void tfunc(const T &) {std::cout << "#1\n";}
template <typename T>void tfunc(T *) {std::cout << "#2\n";}

int main()
{
  int a = 0;

  //func(&a);   // ambiguous
  tfunc(&a);  // unambiguous

  return 0;
}