-
Notifications
You must be signed in to change notification settings - Fork 1
type_template fixed_string
kwikius edited this page Jul 28, 2020
·
6 revisions
A string whose length is known at compile time and that can be used as a NTTP .
Thanks to mpusz for the fixed string code
| value | type | notes |
|---|---|---|
| N | std::size_t |
| typename | type | notes |
|---|---|---|
| CharT | a character type | e.g char or wchar_t |
| Cstr | CharT[N + 1] | |
| FixedString | basic_fixed_string<CharT,N> |
| value | type | notes |
|---|---|---|
| cstr | Cstr | |
| ch | CharT | |
| str1 | FixedString | |
| str2 | FixedString | |
| str_r | FixedString | local result |
| expression | result | notes |
|---|---|---|
| FixedString(cstr) | implicit constructor | |
| FixedString(ch) | implicit constructor | |
| str1 + str2 | str_r |