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
f6fd38bb
Commit
f6fd38bb
authored
Jan 15, 2018
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More iterator support
parent
c2fecb9b
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
131 additions
and
138 deletions
+131
-138
include/fmt/core.h
include/fmt/core.h
+46
-40
include/fmt/format.cc
include/fmt/format.cc
+1
-1
include/fmt/format.h
include/fmt/format.h
+66
-74
include/fmt/printf.h
include/fmt/printf.h
+3
-4
include/fmt/time.h
include/fmt/time.h
+1
-1
test/custom-formatter-test.cc
test/custom-formatter-test.cc
+4
-6
test/format-test.cc
test/format-test.cc
+5
-5
test/ostream-test.cc
test/ostream-test.cc
+3
-5
test/util-test.cc
test/util-test.cc
+2
-2
No files found.
include/fmt/core.h
View file @
f6fd38bb
...
@@ -200,7 +200,8 @@ class basic_buffer {
...
@@ -200,7 +200,8 @@ class basic_buffer {
std
::
size_t
capacity_
;
std
::
size_t
capacity_
;
protected:
protected:
basic_buffer
()
FMT_NOEXCEPT
:
ptr_
(
0
),
size_
(
0
),
capacity_
(
0
)
{}
basic_buffer
(
T
*
p
=
0
,
std
::
size_t
size
=
0
,
std
::
size_t
capacity
=
0
)
FMT_NOEXCEPT:
ptr_
(
p
),
size_
(
size
),
capacity_
(
capacity
)
{}
/** Sets the buffer data and capacity. */
/** Sets the buffer data and capacity. */
void
set
(
T
*
data
,
std
::
size_t
capacity
)
FMT_NOEXCEPT
{
void
set
(
T
*
data
,
std
::
size_t
capacity
)
FMT_NOEXCEPT
{
...
@@ -266,12 +267,12 @@ class basic_buffer {
...
@@ -266,12 +267,12 @@ class basic_buffer {
const
T
&
operator
[](
std
::
size_t
index
)
const
{
return
ptr_
[
index
];
}
const
T
&
operator
[](
std
::
size_t
index
)
const
{
return
ptr_
[
index
];
}
};
};
using
buffer
=
internal
::
basic_buffer
<
char
>
;
using
buffer
=
basic_buffer
<
char
>
;
using
wbuffer
=
internal
::
basic_buffer
<
wchar_t
>
;
using
wbuffer
=
basic_buffer
<
wchar_t
>
;
// A container-backed buffer.
template
<
typename
Container
>
template
<
typename
Container
>
class
container_buffer
class
container_buffer
:
public
basic_buffer
<
typename
Container
::
value_type
>
{
:
public
internal
::
basic_buffer
<
typename
Container
::
value_type
>
{
private:
private:
Container
&
container_
;
Container
&
container_
;
...
@@ -282,7 +283,9 @@ class container_buffer
...
@@ -282,7 +283,9 @@ class container_buffer
}
}
public:
public:
explicit
container_buffer
(
Container
&
c
)
:
container_
(
c
)
{}
explicit
container_buffer
(
Container
&
c
)
:
basic_buffer
<
typename
Container
::
value_type
>
(
&
c
[
0
],
c
.
size
(),
c
.
size
()),
container_
(
c
)
{}
};
};
// A helper function to suppress bogus "conditional expression is constant"
// A helper function to suppress bogus "conditional expression is constant"
...
@@ -771,7 +774,6 @@ class context_base {
...
@@ -771,7 +774,6 @@ class context_base {
private:
private:
basic_parse_context
<
typename
Range
::
value_type
>
parse_context_
;
basic_parse_context
<
typename
Range
::
value_type
>
parse_context_
;
Range
range_
;
iterator
out_
;
iterator
out_
;
basic_format_args
<
Context
>
args_
;
basic_format_args
<
Context
>
args_
;
...
@@ -779,9 +781,9 @@ class context_base {
...
@@ -779,9 +781,9 @@ class context_base {
using
char_type
=
typename
Range
::
value_type
;
using
char_type
=
typename
Range
::
value_type
;
using
format_arg
=
basic_arg
<
Context
>
;
using
format_arg
=
basic_arg
<
Context
>
;
context_base
(
Range
r
ange
,
basic_string_view
<
char_type
>
format_str
,
context_base
(
Range
r
,
basic_string_view
<
char_type
>
format_str
,
basic_format_args
<
Context
>
args
)
basic_format_args
<
Context
>
args
)
:
parse_context_
(
format_str
),
range_
(
range
),
args_
(
args
)
{}
:
parse_context_
(
format_str
),
out_
(
r
.
begin
()
),
args_
(
args
)
{}
basic_format_args
<
Context
>
args
()
const
{
return
args_
;
}
basic_format_args
<
Context
>
args
()
const
{
return
args_
;
}
...
@@ -811,23 +813,33 @@ class context_base {
...
@@ -811,23 +813,33 @@ class context_base {
void
on_error
(
const
char
*
message
)
{
parse_context_
.
on_error
(
message
);
}
void
on_error
(
const
char
*
message
)
{
parse_context_
.
on_error
(
message
);
}
Range
range
()
{
return
range_
;
}
// Returns an iterator to the beginning of the output range.
// Returns an iterator to the beginning of the output range.
auto
begin
()
{
return
std
::
back_inserter
(
range_
.
container
())
;
}
auto
begin
()
{
return
out_
;
}
// Advances the begin iterator to ``it``.
// Advances the begin iterator to ``it``.
void
advance_to
(
iterator
it
)
{
out_
=
it
;
}
void
advance_to
(
iterator
it
)
{
out_
=
it
;
}
};
};
// A range that can grow dynamically.
// Extracts a reference to the container from back_insert_iterator.
template
<
typename
Container
>
inline
Container
&
get_container
(
std
::
back_insert_iterator
<
Container
>
it
)
{
using
iterator
=
std
::
back_insert_iterator
<
Container
>
;
struct
accessor
:
iterator
{
accessor
(
iterator
it
)
:
iterator
(
it
)
{}
using
iterator
::
container
;
};
return
*
accessor
(
it
).
container
;
}
}
// namespace internal
// A range where begin() returns back_insert_iterator.
template
<
typename
Container
>
template
<
typename
Container
>
class
dynamic
_range
{
class
back_insert
_range
{
private:
private:
Container
&
container_
;
Container
&
container_
;
public:
public:
using
iterator
=
decltype
(
container_
.
begin
())
;
using
iterator
=
std
::
back_insert_iterator
<
Container
>
;
using
value_type
=
typename
Container
::
value_type
;
using
value_type
=
typename
Container
::
value_type
;
struct
sentinel
{
struct
sentinel
{
...
@@ -835,20 +847,11 @@ class dynamic_range {
...
@@ -835,20 +847,11 @@ class dynamic_range {
friend
bool
operator
!=
(
iterator
,
sentinel
)
{
return
false
;
}
friend
bool
operator
!=
(
iterator
,
sentinel
)
{
return
false
;
}
};
};
dynamic
_range
(
Container
&
c
)
:
container_
(
c
)
{}
back_insert
_range
(
Container
&
c
)
:
container_
(
c
)
{}
iterator
begin
()
const
{
return
container_
.
begin
(
);
}
iterator
begin
()
const
{
return
std
::
back_inserter
(
container_
);
}
sentinel
end
()
const
{
return
sentinel
();
}
sentinel
end
()
const
{
return
sentinel
();
}
friend
iterator
grow
(
dynamic_range
r
,
size_t
n
)
{
auto
size
=
r
.
container_
.
size
();
r
.
container_
.
resize
(
size
+
n
);
return
r
.
container_
.
begin
()
+
size
;
}
Container
&
container
()
const
{
return
container_
;
}
};
};
}
// namespace internal
// Formatting context.
// Formatting context.
template
<
typename
Range
>
template
<
typename
Range
>
...
@@ -895,8 +898,8 @@ class basic_context :
...
@@ -895,8 +898,8 @@ class basic_context :
format_arg
get_arg
(
basic_string_view
<
char_type
>
name
);
format_arg
get_arg
(
basic_string_view
<
char_type
>
name
);
};
};
using
context
=
basic_context
<
internal
::
dynamic
_range
<
internal
::
buffer
>>
;
using
context
=
basic_context
<
back_insert
_range
<
internal
::
buffer
>>
;
using
wcontext
=
basic_context
<
internal
::
dynamic
_range
<
internal
::
wbuffer
>>
;
using
wcontext
=
basic_context
<
back_insert
_range
<
internal
::
wbuffer
>>
;
template
<
typename
Context
,
typename
...
Args
>
template
<
typename
Context
,
typename
...
Args
>
class
arg_store
{
class
arg_store
{
...
@@ -1016,7 +1019,7 @@ struct named_arg_base {
...
@@ -1016,7 +1019,7 @@ struct named_arg_base {
// Serialized value<context>.
// Serialized value<context>.
mutable
char
data
[
sizeof
(
basic_arg
<
context
>
)];
mutable
char
data
[
sizeof
(
basic_arg
<
context
>
)];
named_arg_base
(
basic_string_view
<
Char
>
n
ame
)
:
name
(
name
)
{}
named_arg_base
(
basic_string_view
<
Char
>
n
m
)
:
name
(
nm
)
{}
template
<
typename
Context
>
template
<
typename
Context
>
basic_arg
<
Context
>
deserialize
()
const
{
basic_arg
<
Context
>
deserialize
()
const
{
...
@@ -1082,18 +1085,21 @@ void vformat_to(internal::buffer &buf, string_view format_str,
...
@@ -1082,18 +1085,21 @@ void vformat_to(internal::buffer &buf, string_view format_str,
void
vformat_to
(
internal
::
wbuffer
&
buf
,
wstring_view
format_str
,
void
vformat_to
(
internal
::
wbuffer
&
buf
,
wstring_view
format_str
,
wformat_args
args
);
wformat_args
args
);
/**
Formats a string and writes the output to out.
*/
template
<
typename
Container
>
template
<
typename
Container
>
void
vformat_to
(
std
::
back_insert_iterator
<
Container
>
out
,
struct
is_contiguous
:
std
::
false_type
{};
string_view
format_str
,
format_args
args
)
{
using
iterator
=
std
::
back_insert_iterator
<
Container
>
;
template
<
typename
Char
>
struct
container_accessor
:
iterator
{
struct
is_contiguous
<
std
::
basic_string
<
Char
>>
:
std
::
true_type
{};
container_accessor
(
iterator
it
)
:
iterator
(
it
)
{}
using
iterator
::
container
;
template
<
typename
Char
>
}
accessor
(
out
);
struct
is_contiguous
<
fmt
::
internal
::
basic_buffer
<
Char
>>
:
std
::
true_type
{};
internal
::
container_buffer
<
Container
>
buf
(
*
accessor
.
container
);
/** Formats a string and writes the output to ``out``. */
template
<
typename
Container
>
typename
std
::
enable_if
<
is_contiguous
<
Container
>::
value
>::
type
vformat_to
(
std
::
back_insert_iterator
<
Container
>
out
,
string_view
format_str
,
format_args
args
)
{
internal
::
container_buffer
<
Container
>
buf
(
internal
::
get_container
(
out
));
vformat_to
(
buf
,
format_str
,
args
);
vformat_to
(
buf
,
format_str
,
args
);
}
}
...
...
include/fmt/format.cc
View file @
f6fd38bb
...
@@ -326,7 +326,7 @@ FMT_FUNC void windows_error::init(
...
@@ -326,7 +326,7 @@ FMT_FUNC void windows_error::init(
}
}
FMT_FUNC
void
internal
::
format_windows_error
(
FMT_FUNC
void
internal
::
format_windows_error
(
buffer
&
out
,
int
error_code
,
string_view
message
)
FMT_NOEXCEPT
{
internal
::
buffer
&
out
,
int
error_code
,
string_view
message
)
FMT_NOEXCEPT
{
FMT_TRY
{
FMT_TRY
{
wmemory_buffer
buf
;
wmemory_buffer
buf
;
buf
.
resize
(
INLINE_BUFFER_SIZE
);
buf
.
resize
(
INLINE_BUFFER_SIZE
);
...
...
include/fmt/format.h
View file @
f6fd38bb
This diff is collapsed.
Click to expand it.
include/fmt/printf.h
View file @
f6fd38bb
...
@@ -289,7 +289,7 @@ struct printf_formatter {
...
@@ -289,7 +289,7 @@ struct printf_formatter {
template
<
typename
FormatContext
>
template
<
typename
FormatContext
>
auto
format
(
const
T
&
value
,
FormatContext
&
ctx
)
->
decltype
(
ctx
.
begin
())
{
auto
format
(
const
T
&
value
,
FormatContext
&
ctx
)
->
decltype
(
ctx
.
begin
())
{
internal
::
format_value
(
ctx
.
range
().
container
(
),
value
);
internal
::
format_value
(
internal
::
get_container
(
ctx
.
begin
()
),
value
);
return
ctx
.
begin
();
return
ctx
.
begin
();
}
}
};
};
...
@@ -336,7 +336,6 @@ class basic_printf_context :
...
@@ -336,7 +336,6 @@ class basic_printf_context :
:
base
(
range
,
format_str
,
args
)
{}
:
base
(
range
,
format_str
,
args
)
{}
using
base
::
parse_context
;
using
base
::
parse_context
;
using
base
::
range
;
using
base
::
begin
;
using
base
::
begin
;
using
base
::
advance_to
;
using
base
::
advance_to
;
...
@@ -419,7 +418,7 @@ unsigned basic_printf_context<Range, AF>::parse_header(
...
@@ -419,7 +418,7 @@ unsigned basic_printf_context<Range, AF>::parse_header(
template
<
typename
Range
,
typename
AF
>
template
<
typename
Range
,
typename
AF
>
void
basic_printf_context
<
Range
,
AF
>::
format
()
{
void
basic_printf_context
<
Range
,
AF
>::
format
()
{
auto
&
buffer
=
this
->
range
().
container
(
);
auto
&
buffer
=
internal
::
get_container
(
this
->
begin
()
);
auto
start
=
iterator
(
this
->
parse_context
());
auto
start
=
iterator
(
this
->
parse_context
());
auto
it
=
start
;
auto
it
=
start
;
using
internal
::
pointer_from
;
using
internal
::
pointer_from
;
...
@@ -528,7 +527,7 @@ void printf(internal::basic_buffer<Char> &buf, basic_string_view<Char> format,
...
@@ -528,7 +527,7 @@ void printf(internal::basic_buffer<Char> &buf, basic_string_view<Char> format,
}
}
template
<
typename
Buffer
>
template
<
typename
Buffer
>
using
printf_context
=
basic_printf_context
<
internal
::
dynamic
_range
<
Buffer
>>
;
using
printf_context
=
basic_printf_context
<
back_insert
_range
<
Buffer
>>
;
using
printf_args
=
basic_format_args
<
printf_context
<
internal
::
buffer
>>
;
using
printf_args
=
basic_format_args
<
printf_context
<
internal
::
buffer
>>
;
...
...
include/fmt/time.h
View file @
f6fd38bb
...
@@ -31,7 +31,7 @@ struct formatter<std::tm> {
...
@@ -31,7 +31,7 @@ struct formatter<std::tm> {
}
}
auto
format
(
const
std
::
tm
&
tm
,
context
&
ctx
)
->
decltype
(
ctx
.
begin
())
{
auto
format
(
const
std
::
tm
&
tm
,
context
&
ctx
)
->
decltype
(
ctx
.
begin
())
{
internal
::
buffer
&
buf
=
ctx
.
range
().
container
(
);
internal
::
buffer
&
buf
=
internal
::
get_container
(
ctx
.
begin
()
);
std
::
size_t
start
=
buf
.
size
();
std
::
size_t
start
=
buf
.
size
();
for
(;;)
{
for
(;;)
{
std
::
size_t
size
=
buf
.
capacity
()
-
start
;
std
::
size_t
size
=
buf
.
capacity
()
-
start
;
...
...
test/custom-formatter-test.cc
View file @
f6fd38bb
...
@@ -15,15 +15,13 @@ using fmt::printf_arg_formatter;
...
@@ -15,15 +15,13 @@ using fmt::printf_arg_formatter;
// A custom argument formatter that doesn't print `-` for floating-point values
// A custom argument formatter that doesn't print `-` for floating-point values
// rounded to 0.
// rounded to 0.
class
CustomArgFormatter
:
class
CustomArgFormatter
:
public
fmt
::
arg_formatter
<
public
fmt
::
arg_formatter
<
fmt
::
back_insert_range
<
fmt
::
internal
::
buffer
>>
{
fmt
::
internal
::
dynamic_range
<
fmt
::
internal
::
buffer
>>
{
public:
public:
using
range
=
fmt
::
internal
::
dynamic
_range
<
fmt
::
internal
::
buffer
>
;
using
range
=
fmt
::
back_insert
_range
<
fmt
::
internal
::
buffer
>
;
using
base
=
fmt
::
arg_formatter
<
range
>
;
using
base
=
fmt
::
arg_formatter
<
range
>
;
CustomArgFormatter
(
range
r
,
fmt
::
basic_context
<
range
>
&
ctx
,
CustomArgFormatter
(
fmt
::
basic_context
<
range
>
&
ctx
,
fmt
::
format_specs
&
s
)
fmt
::
format_specs
&
s
)
:
base
(
ctx
,
s
)
{}
:
base
(
r
,
ctx
,
s
)
{}
using
base
::
operator
();
using
base
::
operator
();
...
...
test/format-test.cc
View file @
f6fd38bb
...
@@ -88,7 +88,7 @@ void std_format(long double value, std::wstring &result) {
...
@@ -88,7 +88,7 @@ void std_format(long double value, std::wstring &result) {
template
<
typename
Char
,
typename
T
>
template
<
typename
Char
,
typename
T
>
::
testing
::
AssertionResult
check_write
(
const
T
&
value
,
const
char
*
type
)
{
::
testing
::
AssertionResult
check_write
(
const
T
&
value
,
const
char
*
type
)
{
fmt
::
basic_memory_buffer
<
Char
>
buffer
;
fmt
::
basic_memory_buffer
<
Char
>
buffer
;
using
range
=
fmt
::
internal
::
dynamic
_range
<
fmt
::
internal
::
basic_buffer
<
Char
>>
;
using
range
=
fmt
::
back_insert
_range
<
fmt
::
internal
::
basic_buffer
<
Char
>>
;
fmt
::
basic_writer
<
range
>
writer
(
buffer
);
fmt
::
basic_writer
<
range
>
writer
(
buffer
);
writer
.
write
(
value
);
writer
.
write
(
value
);
std
::
basic_string
<
Char
>
actual
=
to_string
(
buffer
);
std
::
basic_string
<
Char
>
actual
=
to_string
(
buffer
);
...
@@ -1481,7 +1481,7 @@ TEST(FormatTest, Enum) {
...
@@ -1481,7 +1481,7 @@ TEST(FormatTest, Enum) {
EXPECT_EQ
(
"0"
,
fmt
::
format
(
"{}"
,
A
));
EXPECT_EQ
(
"0"
,
fmt
::
format
(
"{}"
,
A
));
}
}
using
buffer_range
=
fmt
::
internal
::
dynamic
_range
<
fmt
::
internal
::
buffer
>
;
using
buffer_range
=
fmt
::
back_insert
_range
<
fmt
::
internal
::
buffer
>
;
class
mock_arg_formatter
:
class
mock_arg_formatter
:
public
fmt
::
internal
::
arg_formatter_base
<
buffer_range
>
{
public
fmt
::
internal
::
arg_formatter_base
<
buffer_range
>
{
...
@@ -1492,8 +1492,8 @@ class mock_arg_formatter :
...
@@ -1492,8 +1492,8 @@ class mock_arg_formatter :
using
base
=
fmt
::
internal
::
arg_formatter_base
<
buffer_range
>
;
using
base
=
fmt
::
internal
::
arg_formatter_base
<
buffer_range
>
;
using
range
=
buffer_range
;
using
range
=
buffer_range
;
mock_arg_formatter
(
buffer_range
r
,
fmt
::
context
&
,
fmt
::
format_specs
&
s
)
mock_arg_formatter
(
fmt
::
context
&
ctx
,
fmt
::
format_specs
&
s
)
:
base
(
r
,
s
)
{
:
base
(
fmt
::
internal
::
get_container
(
ctx
.
begin
())
,
s
)
{
EXPECT_CALL
(
*
this
,
call
(
42
));
EXPECT_CALL
(
*
this
,
call
(
42
));
}
}
...
@@ -1905,6 +1905,6 @@ TEST(FormatTest, FormatStringErrors) {
...
@@ -1905,6 +1905,6 @@ TEST(FormatTest, FormatStringErrors) {
int
,
int
);
int
,
int
);
}
}
TEST
(
String
Test
,
ToString
)
{
TEST
(
Format
Test
,
ToString
)
{
EXPECT_EQ
(
"42"
,
fmt
::
to_string
(
42
));
EXPECT_EQ
(
"42"
,
fmt
::
to_string
(
42
));
}
}
test/ostream-test.cc
View file @
f6fd38bb
...
@@ -59,17 +59,15 @@ TEST(OStreamTest, Enum) {
...
@@ -59,17 +59,15 @@ TEST(OStreamTest, Enum) {
}
}
struct
test_arg_formatter
:
fmt
::
arg_formatter
<
fmt
::
context
::
range_type
>
{
struct
test_arg_formatter
:
fmt
::
arg_formatter
<
fmt
::
context
::
range_type
>
{
using
base
=
fmt
::
arg_formatter
<
fmt
::
context
::
range_type
>
;
test_arg_formatter
(
fmt
::
context
&
ctx
,
fmt
::
format_specs
&
s
)
test_arg_formatter
(
fmt
::
internal
::
buffer
&
buf
,
fmt
::
context
&
ctx
,
:
fmt
::
arg_formatter
<
fmt
::
context
::
range_type
>
(
ctx
,
s
)
{}
fmt
::
format_specs
&
s
)
:
base
(
buf
,
ctx
,
s
)
{}
};
};
TEST
(
OStreamTest
,
CustomArg
)
{
TEST
(
OStreamTest
,
CustomArg
)
{
fmt
::
memory_buffer
buffer
;
fmt
::
memory_buffer
buffer
;
fmt
::
context
ctx
(
buffer
,
""
,
fmt
::
format_args
());
fmt
::
context
ctx
(
buffer
,
""
,
fmt
::
format_args
());
fmt
::
format_specs
spec
;
fmt
::
format_specs
spec
;
test_arg_formatter
af
(
buffer
,
ctx
,
spec
);
test_arg_formatter
af
(
ctx
,
spec
);
visit
(
af
,
fmt
::
internal
::
make_arg
<
fmt
::
context
>
(
TestEnum
()));
visit
(
af
,
fmt
::
internal
::
make_arg
<
fmt
::
context
>
(
TestEnum
()));
EXPECT_EQ
(
"TestEnum"
,
std
::
string
(
buffer
.
data
(),
buffer
.
size
()));
EXPECT_EQ
(
"TestEnum"
,
std
::
string
(
buffer
.
data
(),
buffer
.
size
()));
}
}
...
...
test/util-test.cc
View file @
f6fd38bb
...
@@ -81,7 +81,7 @@ struct formatter<Test, Char> {
...
@@ -81,7 +81,7 @@ struct formatter<Test, Char> {
return
ctx
.
begin
();
return
ctx
.
begin
();
}
}
using
range
=
fmt
::
internal
::
dynamic
_range
<
basic_buffer
<
Char
>>
;
using
range
=
fmt
::
back_insert
_range
<
basic_buffer
<
Char
>>
;
auto
format
(
Test
,
basic_context
<
range
>
&
ctx
)
->
decltype
(
ctx
.
begin
())
{
auto
format
(
Test
,
basic_context
<
range
>
&
ctx
)
->
decltype
(
ctx
.
begin
())
{
const
Char
*
test
=
"test"
;
const
Char
*
test
=
"test"
;
...
@@ -521,7 +521,7 @@ VISIT_TYPE(float, double);
...
@@ -521,7 +521,7 @@ VISIT_TYPE(float, double);
#define CHECK_ARG_(Char, expected, value) { \
#define CHECK_ARG_(Char, expected, value) { \
testing::StrictMock<MockVisitor<decltype(expected)>> visitor; \
testing::StrictMock<MockVisitor<decltype(expected)>> visitor; \
EXPECT_CALL(visitor, visit(expected)); \
EXPECT_CALL(visitor, visit(expected)); \
using range = fmt::
internal::dynamic
_range<basic_buffer<Char>>; \
using range = fmt::
back_insert
_range<basic_buffer<Char>>; \
fmt::visit(visitor, make_arg<fmt::basic_context<range>>(value)); \
fmt::visit(visitor, make_arg<fmt::basic_context<range>>(value)); \
}
}
...
...
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