projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
148b7d1
)
[flang] Documentation
author
peter klausler
<pklausler@nvidia.com>
Wed, 11 Jul 2018 17:26:53 +0000
(10:26 -0700)
committer
peter klausler
<pklausler@nvidia.com>
Wed, 11 Jul 2018 17:26:53 +0000
(10:26 -0700)
Original-commit: flang-compiler/f18@
d2855c6474b273987492f7f879c0f7a674f35c8f
Reviewed-on: https://github.com/flang-compiler/f18/pull/119
flang/documentation/C++style.md
patch
|
blob
|
history
diff --git
a/flang/documentation/C++style.md
b/flang/documentation/C++style.md
index
2ffdae0
..
2b6cef2
100644
(file)
--- 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`.