Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
de58bfbb
Commit
de58bfbb
authored
Oct 23, 2020
by
Max Kellermann
Committed by
Max Kellermann
Nov 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/TemplateString: use std::size_t
parent
0dda4c06
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
TemplateString.hxx
src/util/TemplateString.hxx
+6
-6
No files found.
src/util/TemplateString.hxx
View file @
de58bfbb
...
...
@@ -40,7 +40,7 @@ namespace TemplateString {
template
<
char
...
_value
>
struct
Construct
{
static
constexpr
char
value
[]
=
{
_value
...,
0
};
static
constexpr
size_t
size
=
sizeof
...(
_value
);
static
constexpr
s
td
::
s
ize_t
size
=
sizeof
...(
_value
);
};
template
<
char
...
_value
>
...
...
@@ -62,14 +62,14 @@ struct CharAsString : Construct<ch> {};
* as variadic arguments.
*/
template
<
template
<
char
...
>
class
F
,
const
char
*
src
,
s
ize_t
length
,
size_t
i
,
const
char
*
src
,
s
td
::
size_t
length
,
std
::
size_t
i
,
char
...
_value
>
struct
VariadicChars
:
VariadicChars
<
F
,
src
,
length
-
1
,
i
+
1
,
_value
...,
src
[
i
]
>
{
static_assert
(
length
>
0
,
"Wrong length"
);
};
template
<
template
<
char
...
>
class
F
,
const
char
*
src
,
size_t
length
,
const
char
*
src
,
s
td
::
s
ize_t
length
,
char
...
_value
>
struct
VariadicChars
<
F
,
src
,
0
,
length
,
_value
...
>
:
F
<
_value
...
>
{};
...
...
@@ -77,7 +77,7 @@ struct VariadicChars<F, src, 0, length, _value...> : F<_value...> {};
* Like #VariadicChars, but pass an additional argument to #F.
*/
template
<
template
<
typename
Arg
,
char
...
>
class
F
,
typename
Arg
,
const
char
*
src
,
s
ize_t
length
,
size_t
i
,
const
char
*
src
,
s
td
::
size_t
length
,
std
::
size_t
i
,
char
...
_value
>
struct
VariadicChars1
:
VariadicChars1
<
F
,
Arg
,
src
,
length
-
1
,
i
+
1
,
_value
...,
src
[
i
]
>
{
...
...
@@ -85,11 +85,11 @@ struct VariadicChars1 : VariadicChars1<F, Arg,
};
template
<
template
<
typename
Arg
,
char
...
>
class
F
,
typename
Arg
,
const
char
*
src
,
size_t
length
,
const
char
*
src
,
s
td
::
s
ize_t
length
,
char
...
_value
>
struct
VariadicChars1
<
F
,
Arg
,
src
,
0
,
length
,
_value
...
>
:
F
<
Arg
,
_value
...
>
{};
template
<
const
char
*
src
,
size_t
length
,
char
...
value
>
template
<
const
char
*
src
,
s
td
::
s
ize_t
length
,
char
...
value
>
struct
_BuildString
:
VariadicChars
<
Construct
,
src
,
length
,
0
,
value
...
>
{};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment