tmp/tmpq9q2pa7e/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Checking string literals <a id="meta.string.literal">[[meta.string.literal]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
consteval bool is_string_literal(const char* p);
|
| 5 |
+
consteval bool is_string_literal(const wchar_t* p);
|
| 6 |
+
consteval bool is_string_literal(const char8_t* p);
|
| 7 |
+
consteval bool is_string_literal(const char16_t* p);
|
| 8 |
+
consteval bool is_string_literal(const char32_t* p);
|
| 9 |
+
```
|
| 10 |
+
|
| 11 |
+
*Returns:*
|
| 12 |
+
|
| 13 |
+
- If `p` points to an unspecified object [[expr.const]], `false`.
|
| 14 |
+
- Otherwise, if `p` points to a subobject of a string literal
|
| 15 |
+
object [[lex.string]], `true`.
|
| 16 |
+
- Otherwise, `false`.
|
| 17 |
+
|