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
1042ddda
Commit
1042ddda
authored
Dec 18, 2015
by
vitaut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document BasicFormatter
parent
d998b5d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
format.h
format.h
+12
-2
No files found.
format.h
View file @
1042ddda
...
...
@@ -1840,10 +1840,11 @@ class PrintfFormatter : private FormatterBase {
};
}
// namespace internal
/
/ A formatter.
/
** This template formats data and writes the output to a writer. */
template
<
typename
CharType
>
class
BasicFormatter
:
private
internal
::
FormatterBase
{
public:
/** The character type for the output. */
typedef
CharType
Char
;
private:
...
...
@@ -1865,13 +1866,23 @@ class BasicFormatter : private internal::FormatterBase {
internal
::
Arg
parse_arg_name
(
const
Char
*&
s
);
public:
/**
* \rst
* Constructs a ``BasicFormatter`` object. References to the arguments and
* the writer are stored in the formatter object so make sure they have
* appropriate lifetimes.
* \endrst
*/
BasicFormatter
(
const
ArgList
&
args
,
BasicWriter
<
Char
>
&
w
)
:
internal
::
FormatterBase
(
args
),
writer_
(
w
)
{}
/** Returns a reference to the writer associated with this formatter. */
BasicWriter
<
Char
>
&
writer
()
{
return
writer_
;
}
/** Formats stored arguments and writes the output to the writer. */
void
format
(
BasicCStringRef
<
Char
>
format_str
);
// Formats a single argument and advances format_str, a format string pointer.
const
Char
*
format
(
const
Char
*&
format_str
,
const
internal
::
Arg
&
arg
);
};
...
...
@@ -3468,7 +3479,6 @@ inline internal::Arg BasicFormatter<Char>::parse_arg_name(const Char *&s) {
return
arg
;
}
// Should be after FormatSpec
template
<
typename
Char
>
const
Char
*
BasicFormatter
<
Char
>::
format
(
const
Char
*&
format_str
,
const
internal
::
Arg
&
arg
)
{
...
...
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