Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
e2e557e2
Commit
e2e557e2
authored
Aug 25, 2019
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove preparator
parent
a5f470eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
16 deletions
+4
-16
include/fmt/compile.h
include/fmt/compile.h
+4
-16
No files found.
include/fmt/compile.h
View file @
e2e557e2
...
...
@@ -494,18 +494,6 @@ class parts_container {
private:
Container
parts_
;
};
// Delegate preparing to preparator, to take advantage of a partial
// specialization.
template
<
typename
Format
,
typename
...
Args
>
struct
preparator
{
using
container
=
parts_container
<
char_t
<
Format
>>
;
using
prepared_format_type
=
typename
basic_prepared_format
<
Format
,
container
,
Args
...
>::
type
;
static
auto
prepare
(
Format
format
)
->
prepared_format_type
{
return
prepared_format_type
(
std
::
move
(
format
));
}
};
}
// namespace internal
#if FMT_USE_CONSTEXPR
...
...
@@ -519,11 +507,11 @@ FMT_CONSTEXPR auto compile(S format_str) {
template
<
typename
...
Args
,
typename
Char
,
size_t
N
>
auto
compile
(
const
Char
(
&
format_str
)[
N
])
->
typename
internal
::
preparator
<
std
::
basic_string
<
Char
>
,
Args
...
>::
prepared_format_type
{
typename
internal
::
basic_prepared_format
<
std
::
basic_string
<
Char
>
,
internal
::
parts_container
<
Char
>
,
Args
...
>::
type
{
const
auto
view
=
basic_string_view
<
Char
>
(
format_str
,
N
-
1
);
return
internal
::
preparator
<
std
::
basic_string
<
Char
>
,
Args
...
>::
prepare
(
internal
::
to_runtime_format
(
view
));
return
internal
::
to_runtime_format
(
view
);
}
template
<
typename
CompiledFormat
,
typename
...
Args
,
...
...
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