#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");
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKbmFtZXNwYWNlIGRldGFpbAp7CiAgICB0ZW1wbGF0ZSA8dHlwZW5hbWUgVD4gc3RydWN0IGhlbHBlcjsKCiAgICB0ZW1wbGF0ZSA8dHlwZW5hbWUgVD4gc3RydWN0IGhlbHBlcjxUKj4geyB2b2lkIG9wZXJhdG9yKCkgKCkgY29uc3Qge3N0ZDo6Y291dCA8PCAicG9pbnRlclxuIjt9IH07CiAgICB0ZW1wbGF0ZSA8dHlwZW5hbWUgVCwgc3RkOjpzaXplX3QgTj4gc3RydWN0IGhlbHBlcjxUW05dPiB7IHZvaWQgb3BlcmF0b3IoKSAoKWNvbnN0IHtzdGQ6OmNvdXQgPDwgImFycmF5XG4iO30gfTsKfQoKCnRlbXBsYXRlIDx0eXBlbmFtZSBUPgp2b2lkIGYoY29uc3QgVCYgKQp7CiAgICBkZXRhaWw6OmhlbHBlcjxUPnt9KCk7Cn0KCmludCBtYWluKCkgewogICAgY29uc3QgY2hhciBhW10gPSAidG90byI7CiAgICBjb25zdCBjaGFyKnAgPSAidG90byI7CgogICAgZihhKTsKICAgIGYocCk7CiAgICBmKCJ0b3RvIik7Cgp9Cg==