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
156744ad
Commit
156744ad
authored
May 29, 2022
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify fmt::runtime
parent
d9c7166c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
include/fmt/core.h
include/fmt/core.h
+3
-7
No files found.
include/fmt/core.h
View file @
156744ad
...
@@ -3080,10 +3080,8 @@ template <typename Char, typename... Args> class basic_format_string {
...
@@ -3080,10 +3080,8 @@ template <typename Char, typename... Args> class basic_format_string {
#if FMT_GCC_VERSION && FMT_GCC_VERSION < 409
#if FMT_GCC_VERSION && FMT_GCC_VERSION < 409
// Workaround broken conversion on older gcc.
// Workaround broken conversion on older gcc.
template
<
typename
...
Args
>
using
format_string
=
string_view
;
template
<
typename
...
>
using
format_string
=
string_view
;
template
<
typename
S
>
auto
runtime
(
const
S
&
s
)
->
basic_string_view
<
char_t
<
S
>>
{
inline
auto
runtime
(
string_view
s
)
->
basic_string_view
<
char
>
{
return
s
;
}
return
s
;
}
#else
#else
template
<
typename
...
Args
>
template
<
typename
...
Args
>
using
format_string
=
basic_format_string
<
char
,
type_identity_t
<
Args
>
...
>
;
using
format_string
=
basic_format_string
<
char
,
type_identity_t
<
Args
>
...
>
;
...
@@ -3097,9 +3095,7 @@ using format_string = basic_format_string<char, type_identity_t<Args>...>;
...
@@ -3097,9 +3095,7 @@ using format_string = basic_format_string<char, type_identity_t<Args>...>;
fmt::print(fmt::runtime("{:d}"), "I am not a number");
fmt::print(fmt::runtime("{:d}"), "I am not a number");
\endrst
\endrst
*/
*/
template
<
typename
S
>
auto
runtime
(
const
S
&
s
)
->
basic_runtime
<
char_t
<
S
>>
{
inline
auto
runtime
(
string_view
s
)
->
basic_runtime
<
char
>
{
return
{{
s
}};
}
return
{{
s
}};
}
#endif
#endif
FMT_API
auto
vformat
(
string_view
fmt
,
format_args
args
)
->
std
::
string
;
FMT_API
auto
vformat
(
string_view
fmt
,
format_args
args
)
->
std
::
string
;
...
...
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