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
1c6d85f7
Commit
1c6d85f7
authored
Nov 17, 2019
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply coding conventions to examples
parent
4a1da44f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
doc/api.rst
doc/api.rst
+4
-4
No files found.
doc/api.rst
View file @
1c6d85f7
...
@@ -167,7 +167,7 @@ example::
...
@@ -167,7 +167,7 @@ example::
struct fmt::formatter<color>: formatter<string_view> {
struct fmt::formatter<color>: formatter<string_view> {
// parse is inherited from formatter<string_view>.
// parse is inherited from formatter<string_view>.
template <typename FormatContext>
template <typename FormatContext>
auto format(color c, FormatContext
&
ctx) {
auto format(color c, FormatContext
&
ctx) {
string_view name = "unknown";
string_view name = "unknown";
switch (c) {
switch (c) {
case color::red: name = "red"; break;
case color::red: name = "red"; break;
...
@@ -293,7 +293,7 @@ allocator::
...
@@ -293,7 +293,7 @@ allocator::
template <typename ...Args>
template <typename ...Args>
inline custom_string format(custom_allocator alloc,
inline custom_string format(custom_allocator alloc,
fmt::string_view format_str,
fmt::string_view format_str,
const Args
& ... args) {
const Args& ... args) {
return vformat(alloc, format_str, fmt::make_format_args(args...));
return vformat(alloc, format_str, fmt::make_format_args(args...));
}
}
...
@@ -337,7 +337,7 @@ custom argument formatter class::
...
@@ -337,7 +337,7 @@ custom argument formatter class::
template <typename ...Args>
template <typename ...Args>
inline std::string custom_format(
inline std::string custom_format(
fmt::string_view format_str, const Args
&... args) {
fmt::string_view format_str, const Args&... args) {
return custom_vformat(format_str, fmt::make_format_args(args...));
return custom_vformat(format_str, fmt::make_format_args(args...));
}
}
...
@@ -404,7 +404,7 @@ user-defined types that have overloaded ``operator<<``::
...
@@ -404,7 +404,7 @@ user-defined types that have overloaded ``operator<<``::
public:
public:
date(int year, int month, int day): year_(year), month_(month), day_(day) {}
date(int year, int month, int day): year_(year), month_(month), day_(day) {}
friend std::ostream
&operator<<(std::ostream &os, const date &
d) {
friend std::ostream
& operator<<(std::ostream& os, const date&
d) {
return os << d.year_ << '-' << d.month_ << '-' << d.day_;
return os << d.year_ << '-' << d.month_ << '-' << d.day_;
}
}
};
};
...
...
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