|
REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
|
A fixed-size string usable as a non-type template parameter. More...
#include <storage.hpp>
Public Member Functions | |
| constexpr | fixed_string (const char(&literal)[N]) |
| Captures a string literal. | |
| constexpr std::string_view | view () const |
| Returns a view of the string, excluding the trailing NUL. | |
Public Attributes | |
| char | data [N] = {} |
| The captured characters, including the trailing NUL. | |
A fixed-size string usable as a non-type template parameter.
Enables static_regex<"\d+">: the literal is captured into data at compile time.
| N | Size of the character array, including the terminating NUL. |
Definition at line 46 of file storage.hpp.
|
inlineconstexpr |
Captures a string literal.
Implicit by design: it is what lets a string literal be a non-type template argument; marking it explicit would defeat the purpose.
| [in] | literal | The string literal to capture. |
Definition at line 59 of file storage.hpp.
|
inlineconstexpr |
Returns a view of the string, excluding the trailing NUL.
Definition at line 69 of file storage.hpp.
| char real::fixed_string< N >::data[N] = {} |
The captured characters, including the trailing NUL.
Definition at line 48 of file storage.hpp.