[meta.string.literal]

# 21 Metaprogramming library [[meta]](./#meta)

## 21.4 Reflection [[meta.reflection]](meta.reflection#meta.string.literal)

### 21.4.2 Checking string literals [meta.string.literal]

[ð](#lib:is_string_literal)

`consteval bool is_string_literal(const char* p);
consteval bool is_string_literal(const wchar_t* p);
consteval bool is_string_literal(const char8_t* p);
consteval bool is_string_literal(const char16_t* p);
consteval bool is_string_literal(const char32_t* p);
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/meta.tex#L3350)

*Returns*: 

- [(1.1)](#1.1)

  If p points to an unspecified object ([[expr.const]](expr.const "7.7 Constant expressions")), false[.](#1.1.sentence-1)

- [(1.2)](#1.2)

  Otherwise, if p points to a subobject
 of a string literal object ([[lex.string]](lex.string "5.13.5 String literals")), true[.](#1.2.sentence-1)

- [(1.3)](#1.3)

  Otherwise, false[.](#1.3.sentence-1)
