#include <iostream>

namespace detail
{
    template <typename T> struct helper;

    template <typename T> struct helper<T*> { void operator() () const {std::cout << "pointer\n";} };
    template <typename T, std::size_t N> struct helper<T[N]> { void operator() ()const {std::cout << "array\n";} };
}


template <typename T>
void f(const T& )
{
    detail::helper<T>{}();
}

int main() {
    const char a[] = "toto";
    const char*p = "toto";

    f(a);
    f(p);
    f("toto");

}
