From bfc6c3b9ae50a67e11bd1302e21bcf8acd1399b9 Mon Sep 17 00:00:00 2001 From: peter klausler Date: Wed, 11 Jul 2018 10:26:53 -0700 Subject: [PATCH] [flang] Documentation Original-commit: flang-compiler/f18@d2855c6474b273987492f7f879c0f7a674f35c8f Reviewed-on: https://github.com/flang-compiler/f18/pull/119 --- flang/documentation/C++style.md | 1 + 1 file changed, 1 insertion(+) diff --git a/flang/documentation/C++style.md b/flang/documentation/C++style.md index 2ffdae0..2b6cef2 100644 --- a/flang/documentation/C++style.md +++ b/flang/documentation/C++style.md @@ -106,6 +106,7 @@ Use `{braced initializers}` in all circumstances where they work, including default data member initialization. They inhibit implicit truncation. Don't use `= expr` initialization just to effect implicit truncation; prefer an explicit `static_cast<>`. +With C++17, braced initializers work fine with `auto` too. 1. Avoid unsigned types apart from `size_t`, which must be used with care. When `int` just obviously works, just use `int`. When you need something bigger than `int`, use `std::int64_t` rather than `long` or `long long`. -- 2.7.4