Why don't we make all string literals constexpr
?
constexpr char name[] = "hello";
template < const char* N >
struct T{};
T < name > t;// this works fine
T < "hello" > t1; // this doesn't work
Why don't we make all string literals constexpr
?
constexpr char name[] = "hello";
template < const char* N >
struct T{};
T < name > t;// this works fine
T < "hello" > t1; // this doesn't work