Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
CoMISo
Base
Commits
40a2bc5b
Commit
40a2bc5b
authored
Feb 20, 2017
by
Martin Marinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support to Base::FormatT<> for formatting multiple arguments and access to the buffer.
parent
442e1843
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
Utils/IOutputStream.hh
Utils/IOutputStream.hh
+14
-0
No files found.
Utils/IOutputStream.hh
View file @
40a2bc5b
...
...
@@ -207,11 +207,25 @@ public:
print
(
bffr_
,
_bffr_size
,
_frmt
,
_vrbl
);
}
#if __cplusplus >= 201103L || _MSC_VER >= 1900 //C++11 support
// Variadic template constructor
template
<
typename
...
ArgT
>
FormatT
(
const
char
*
const
_frmt
,
const
ArgT
&
...
_args
)
{
print
(
bffr_
,
_bffr_size
,
_frmt
,
_args
...);
}
#endif//C++11 support
friend
IOutputStream
&
operator
<<
(
IOutputStream
&
_os
,
const
Self
&
_frmt
)
{
return
_os
<<
_frmt
.
bffr_
;
}
const
char
*
buffer
()
const
{
return
bffr_
;
}
private:
char
bffr_
[
_bffr_size
];
};
...
...
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