From 1c6d85f7bb0544c33c8aaf080c847d7a957d69b4 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 17 Nov 2019 10:15:16 -0800 Subject: [PATCH] Apply coding conventions to examples --- doc/api.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api.rst b/doc/api.rst index 49d6c920..d5164eec 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -167,7 +167,7 @@ example:: struct fmt::formatter: formatter { // parse is inherited from formatter. template - auto format(color c, FormatContext &ctx) { + auto format(color c, FormatContext& ctx) { string_view name = "unknown"; switch (c) { case color::red: name = "red"; break; @@ -293,7 +293,7 @@ allocator:: template inline custom_string format(custom_allocator alloc, fmt::string_view format_str, - const Args & ... args) { + const Args& ... args) { return vformat(alloc, format_str, fmt::make_format_args(args...)); } @@ -337,7 +337,7 @@ custom argument formatter class:: template 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...)); } @@ -404,7 +404,7 @@ user-defined types that have overloaded ``operator<<``:: public: 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_; } };