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
bf20d199
Commit
bf20d199
authored
Sep 03, 2021
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify the core API
parent
fc088403
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
include/fmt/core.h
include/fmt/core.h
+6
-12
No files found.
include/fmt/core.h
View file @
bf20d199
...
@@ -2446,7 +2446,7 @@ FMT_CONSTEXPR auto parse_replacement_field(const Char* begin, const Char* end,
...
@@ -2446,7 +2446,7 @@ FMT_CONSTEXPR auto parse_replacement_field(const Char* begin, const Char* end,
template
<
bool
IS_CONSTEXPR
,
typename
Char
,
typename
Handler
>
template
<
bool
IS_CONSTEXPR
,
typename
Char
,
typename
Handler
>
FMT_CONSTEXPR
FMT_INLINE
void
parse_format_string
(
FMT_CONSTEXPR
FMT_INLINE
void
parse_format_string
(
basic_string_view
<
Char
>
format_str
,
Handler
&&
handler
)
{
basic_string_view
<
Char
>
format_str
,
Handler
&&
handler
)
{
//
this is most likely a name-lookup defect in msvc's modules implementation
//
Workaround a name-lookup bug in MSVC's modules implementation.
using
detail
::
find
;
using
detail
::
find
;
auto
begin
=
format_str
.
data
();
auto
begin
=
format_str
.
data
();
...
@@ -2722,16 +2722,11 @@ constexpr auto get_arg_index_by_name(basic_string_view<Char> name) -> int {
...
@@ -2722,16 +2722,11 @@ constexpr auto get_arg_index_by_name(basic_string_view<Char> name) -> int {
template
<
typename
...
Args
,
typename
Char
>
template
<
typename
...
Args
,
typename
Char
>
FMT_CONSTEXPR
auto
get_arg_index_by_name
(
basic_string_view
<
Char
>
name
)
->
int
{
FMT_CONSTEXPR
auto
get_arg_index_by_name
(
basic_string_view
<
Char
>
name
)
->
int
{
#if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
#if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
if
constexpr
(
sizeof
...(
Args
)
>
0
)
{
if
constexpr
(
sizeof
...(
Args
)
>
0
)
return
get_arg_index_by_name
<
0
,
Args
...
>
(
name
);
return
get_arg_index_by_name
<
0
,
Args
...
>
(
name
);
}
else
{
#endif
(
void
)
name
;
return
invalid_arg_index
;
}
#else
(
void
)
name
;
(
void
)
name
;
return
invalid_arg_index
;
return
invalid_arg_index
;
#endif
}
}
template
<
typename
Char
,
typename
ErrorHandler
,
typename
...
Args
>
template
<
typename
Char
,
typename
ErrorHandler
,
typename
...
Args
>
...
@@ -2967,7 +2962,7 @@ template <typename OutputIt,
...
@@ -2967,7 +2962,7 @@ template <typename OutputIt,
auto
vformat_to
(
OutputIt
out
,
string_view
fmt
,
format_args
args
)
->
OutputIt
{
auto
vformat_to
(
OutputIt
out
,
string_view
fmt
,
format_args
args
)
->
OutputIt
{
using
detail
::
get_buffer
;
using
detail
::
get_buffer
;
auto
&&
buf
=
get_buffer
<
char
>
(
out
);
auto
&&
buf
=
get_buffer
<
char
>
(
out
);
detail
::
vformat_to
(
buf
,
string_view
(
fmt
)
,
args
,
{});
detail
::
vformat_to
(
buf
,
fmt
,
args
,
{});
return
detail
::
get_iterator
(
buf
);
return
detail
::
get_iterator
(
buf
);
}
}
...
@@ -3001,9 +2996,8 @@ template <typename OutputIt, typename... T,
...
@@ -3001,9 +2996,8 @@ template <typename OutputIt, typename... T,
FMT_ENABLE_IF
(
detail
::
is_output_iterator
<
OutputIt
,
char
>
::
value
)
>
FMT_ENABLE_IF
(
detail
::
is_output_iterator
<
OutputIt
,
char
>
::
value
)
>
auto
vformat_to_n
(
OutputIt
out
,
size_t
n
,
string_view
fmt
,
format_args
args
)
auto
vformat_to_n
(
OutputIt
out
,
size_t
n
,
string_view
fmt
,
format_args
args
)
->
format_to_n_result
<
OutputIt
>
{
->
format_to_n_result
<
OutputIt
>
{
using
buffer
=
using
traits
=
detail
::
fixed_buffer_traits
;
detail
::
iterator_buffer
<
OutputIt
,
char
,
detail
::
fixed_buffer_traits
>
;
auto
buf
=
detail
::
iterator_buffer
<
OutputIt
,
char
,
traits
>
(
out
,
n
);
auto
buf
=
buffer
(
out
,
n
);
detail
::
vformat_to
(
buf
,
fmt
,
args
,
{});
detail
::
vformat_to
(
buf
,
fmt
,
args
,
{});
return
{
buf
.
out
(),
buf
.
count
()};
return
{
buf
.
out
(),
buf
.
count
()};
}
}
...
...
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