32 using codeAndRepr = std::pair<const char *, const char *>;
33 constexpr static std::array<codeAndRepr, 4> forbiddenChars{codeAndRepr{
"\u002E",
"."}, codeAndRepr{
"\u002F",
"/"},
34 codeAndRepr{
"\u0020",
"space"},
35 codeAndRepr{
"\u005C",
"\\"}};
37 for (
auto &&[code, repr] : forbiddenChars) {
38 if (
name.find(code) != std::string_view::npos)
39 return R__FAIL(std::string(where) +
" name '" + std::string(
name) +
"' cannot contain character '" + repr +
43 if (std::count_if(
name.begin(),
name.end(), [](
unsigned char c) { return std::iscntrl(c); }))
44 return R__FAIL(std::string(where) +
" name '" + std::string(
name) +
45 "' cannot contain character classified as control character. These notably include newline, tab, "