I want to be able to differentiate array from pointers in overload resolution :
class string {
public:
string(const char* c_str);
template&
You can use SFINAE. This might not be the best way, but it should work ok:
//thanks to dyp for further reduction
template::value>::type>
string(const T * const &) {std::cout << "const char *\n";}
template //credit to jrok for noticing the unnecessary SFINAE
string(const char(&)[N]) {std::cout << "const char(&)[" << N << "]\n";}
Here's a live example.