|
welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
|
A string literal captured by value, length included, so it can live in a structural annotation constant. More...
#include <welder/annotations.hpp>
Public Member Functions | |
| consteval | fixed_string (const char(&s)[N]) |
| Capture the characters of s. | |
Public Attributes | |
| char | data [N] {} |
| The captured characters, including the terminator. | |
A string literal captured by value, length included, so it can live in a structural annotation constant.
Doc text is stored inline (a char array) rather than as a const char* to a string literal: a pointer-to-literal is not a permitted annotation value (gcc-16 rejects it as a non-structural constant), whereas an inline array is.
| N | the literal's length including the terminator (deduced). |
Definition at line 257 of file annotations.hpp.
|
inlineconsteval |
Capture the characters of s.
| s | the source string literal. |
Definition at line 260 of file annotations.hpp.
References data.
| char welder::detail::fixed_string< N >::data[N] {} |
The captured characters, including the terminator.
Definition at line 258 of file annotations.hpp.
Referenced by fixed_string().