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
e8bd2a80
Unverified
Commit
e8bd2a80
authored
Jun 23, 2022
by
Jonathan W
Committed by
GitHub
Jun 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix enable_ifs for map formatter (#2944)
parent
7c56e11e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
include/fmt/ranges.h
include/fmt/ranges.h
+13
-4
No files found.
include/fmt/ranges.h
View file @
e8bd2a80
...
@@ -269,6 +269,14 @@ using range_reference_type =
...
@@ -269,6 +269,14 @@ using range_reference_type =
template
<
typename
Range
>
template
<
typename
Range
>
using
uncvref_type
=
remove_cvref_t
<
range_reference_type
<
Range
>>
;
using
uncvref_type
=
remove_cvref_t
<
range_reference_type
<
Range
>>
;
template
<
typename
Range
>
using
uncvref_first_type
=
remove_cvref_t
<
decltype
(
std
::
declval
<
range_reference_type
<
Range
>>
().
first
)
>
;
template
<
typename
Range
>
using
uncvref_second_type
=
remove_cvref_t
<
decltype
(
std
::
declval
<
range_reference_type
<
Range
>>
().
second
)
>
;
template
<
typename
OutputIt
>
OutputIt
write_delimiter
(
OutputIt
out
)
{
template
<
typename
OutputIt
>
OutputIt
write_delimiter
(
OutputIt
out
)
{
*
out
++
=
','
;
*
out
++
=
','
;
*
out
++
=
' '
;
*
out
++
=
' '
;
...
@@ -452,11 +460,12 @@ struct formatter<
...
@@ -452,11 +460,12 @@ struct formatter<
enable_if_t
<
detail
::
is_map
<
T
>::
value
enable_if_t
<
detail
::
is_map
<
T
>::
value
// Workaround a bug in MSVC 2019 and earlier.
// Workaround a bug in MSVC 2019 and earlier.
#if !FMT_MSC_VERSION
#if !FMT_MSC_VERSION
&&
(
is_formattable
<
detail
::
uncvref_type
<
T
>
,
Char
>::
value
||
&&
(
is_formattable
<
detail
::
uncvref_first_type
<
T
>
,
Char
>::
value
||
detail
::
has_fallback_formatter
<
detail
::
uncvref_type
<
T
>
,
detail
::
has_fallback_formatter
<
detail
::
uncvref_first_type
<
T
>
,
Char
>::
value
)
Char
>::
value
)
&&
(
is_formattable
<
detail
::
uncvref_second_type
<
T
>
,
Char
>::
value
||
detail
::
has_fallback_formatter
<
detail
::
uncvref_second_type
<
T
>
,
Char
>::
value
)
#endif
#endif
>>
{
>>
{
template
<
typename
ParseContext
>
template
<
typename
ParseContext
>
FMT_CONSTEXPR
auto
parse
(
ParseContext
&
ctx
)
->
decltype
(
ctx
.
begin
())
{
FMT_CONSTEXPR
auto
parse
(
ParseContext
&
ctx
)
->
decltype
(
ctx
.
begin
())
{
return
ctx
.
begin
();
return
ctx
.
begin
();
...
...
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