std::define_static_string
From cppreference.com
| Defined in header <meta>
|
||
template< ranges::input_range R >
consteval const ranges::range_value_t<R>* define_static_string( R&& r );
|
(since C++26) | |
Promotes character array to static storage. A null character is appended if r is not a string literal object.
Equivalent to:
return std::meta::extract<const ranges::range_value_t<R>*>(std::meta::reflect_constant_string(r));
Parameters
| r | - | a input_range of characters
|
Return value
A pointer to the first element of a character array object which is a template parameter object.
Notes
As a template parameter object, the resulting string object has static storage duration. Strings with the same contents correspond to the same object.
The resulting template parameter object is a potentially non-unique object.
Example
| This section is incomplete Reason: no example |
See also
| |||