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
a291f07e
Commit
a291f07e
authored
Jun 09, 2019
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up argument mapping
parent
5d9100fa
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
103 additions
and
153 deletions
+103
-153
include/fmt/core.h
include/fmt/core.h
+96
-150
include/fmt/format.h
include/fmt/format.h
+1
-1
test/core-test.cc
test/core-test.cc
+6
-2
No files found.
include/fmt/core.h
View file @
a291f07e
This diff is collapsed.
Click to expand it.
include/fmt/format.h
View file @
a291f07e
...
...
@@ -3025,7 +3025,7 @@ class format_int {
template
<
typename
T
,
typename
Char
>
struct
formatter
<
T
,
Char
,
enable_if_t
<
internal
::
type_constant
<
T
,
Char
>::
value
!=
internal
::
none
_type
>>
{
internal
::
custom
_type
>>
{
FMT_CONSTEXPR
formatter
()
:
format_str_
(
nullptr
)
{}
// Parses format specifiers stopping either at the end of the range or at the
...
...
test/core-test.cc
View file @
a291f07e
...
...
@@ -229,8 +229,8 @@ struct custom_context {
TEST
(
ArgTest
,
MakeValueWithCustomContext
)
{
test_struct
t
;
fmt
::
internal
::
value
<
custom_context
>
arg
=
fmt
::
internal
::
make_value
<
custom_context
>
(
t
);
fmt
::
internal
::
value
<
custom_context
>
arg
(
fmt
::
internal
::
arg_mapper
<
custom_context
>
().
map
(
t
)
);
custom_context
ctx
=
{
false
,
fmt
::
format_parse_context
(
""
)};
arg
.
custom
.
format
(
&
t
,
ctx
.
parse_context
(),
ctx
);
EXPECT_TRUE
(
ctx
.
called
);
...
...
@@ -588,6 +588,10 @@ TEST(CoreTest, FormatForeignStrings) {
EXPECT_EQ
(
fmt
::
format
(
my_string
<
wchar_t
>
(
L"{}"
),
QString
(
L"42"
)),
L"42"
);
}
struct
implicitly_convertible_to_string
{
operator
std
::
string
()
const
{
return
"foo"
;
}
};
struct
implicitly_convertible_to_string_view
{
operator
fmt
::
string_view
()
const
{
return
"foo"
;
}
};
...
...
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