If my code has this constexpr string
constexpr char my_str[] = \"hello\";
the type of my_str contains information
21.8, 1 and 2, in the standard says:
Tables 74, 75, 76, 77, 78, and 79 describe headers
,,,,(character conversions), and, respectively.The contents of these headers shall be the same as the Standard C Library headers
,,,, andand the C Unicode TR header, respectively, with the following modifications:
strlen is defined in in in c++. The modifications that follow do not mention strlen. From that, I would conclude that the signature in C++ must be exactly the same as it is in C, and since C does not have constexpr, it is technically non-compliant. That said, this is one of those non-compliant things that's unlikely to do any harm, beyond relying on it on one platform and then not finding it on another.