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
b939860d
Commit
b939860d
authored
Jun 30, 2014
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
write -> write_str
parent
14e7ed76
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
format.h
format.h
+2
-2
test/format-test.cc
test/format-test.cc
+1
-1
No files found.
format.h
View file @
b939860d
...
@@ -1435,7 +1435,7 @@ class BasicWriter {
...
@@ -1435,7 +1435,7 @@ class BasicWriter {
return
*
this
;
return
*
this
;
}
}
void
write
(
const
std
::
basic_string
<
Char
>
&
s
,
const
FormatSpec
&
spec
)
{
void
write
_str
(
const
std
::
basic_string
<
Char
>
&
s
,
const
FormatSpec
&
spec
)
{
write_str
(
s
.
data
(),
s
.
size
(),
spec
);
write_str
(
s
.
data
(),
s
.
size
(),
spec
);
}
}
...
@@ -1645,7 +1645,7 @@ template <typename Char, typename T>
...
@@ -1645,7 +1645,7 @@ template <typename Char, typename T>
void
format
(
BasicWriter
<
Char
>
&
w
,
const
FormatSpec
&
spec
,
const
T
&
value
)
{
void
format
(
BasicWriter
<
Char
>
&
w
,
const
FormatSpec
&
spec
,
const
T
&
value
)
{
std
::
basic_ostringstream
<
Char
>
os
;
std
::
basic_ostringstream
<
Char
>
os
;
os
<<
value
;
os
<<
value
;
w
.
write
(
os
.
str
(),
spec
);
w
.
write
_str
(
os
.
str
(),
spec
);
}
}
namespace
internal
{
namespace
internal
{
...
...
test/format-test.cc
View file @
b939860d
...
@@ -1319,7 +1319,7 @@ class Answer {};
...
@@ -1319,7 +1319,7 @@ class Answer {};
template
<
typename
Char
>
template
<
typename
Char
>
void
format
(
BasicWriter
<
Char
>
&
w
,
const
fmt
::
FormatSpec
&
spec
,
Answer
)
{
void
format
(
BasicWriter
<
Char
>
&
w
,
const
fmt
::
FormatSpec
&
spec
,
Answer
)
{
w
.
write
(
"42"
,
spec
);
w
.
write
_str
(
"42"
,
spec
);
}
}
TEST
(
FormatterTest
,
CustomFormat
)
{
TEST
(
FormatterTest
,
CustomFormat
)
{
...
...
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