インライン変数の記事の改善#975
Merged
Merged
Conversation
Contributor
|
修正ありがとうございます。 #972 での私の疑問点は全て解消されておりました。 |
Member
Author
|
@hi-hori 確認ありがとうございます! |
3f40772 to
25c6307
Compare
hi-hori
approved these changes
May 24, 2022
yumetodo
reviewed
May 24, 2022
Member
Author
|
http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4910.pdf を見てます (もっと正確に書くと cplusplus/draft から自分でビルドしたのを見てました)。N4901 と N4910 で番号が似ているのでややこしいですが... |
Member
Author
5807ff3 to
b157c07
Compare
inlineを指定する前に変数定義をして後出しで inline を指定するのは文法違 反ではなく意味論違反であり、不適格である [1]。 [1] N4910 [dcl.inline]/5
bb30478 to
cac5e43
Compare
yumetodo
approved these changes
May 26, 2022
Member
Author
|
しばらく待って(追加)意見がなければマージしようと思います。よろしくお願いいたします。 |
k-satoda
reviewed
May 26, 2022
元の記述だと一つの翻訳単位(C++20では正確には定義ドメイン)でインライン が指定されていれば全ての翻訳単位でインラインが暗黙に指定されるかのよう に読めるが、規格 [1] を読む限りは同変数を宣言する全ての翻訳単位で inline を明示的に指定する必要がある。 [1] N4910 [dcl.inline]/5 Co-authored-by: Kazutoshi SATODA <k_satoda@f2.dion.ne.jp>
8a33b86 to
b4e1a77
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolve #972
#972 に関する修正の他にも色々気になることがあるのでまとめて PR にします。
対応項目一覧
int func(void);? → 全てfunc()の形式に。未対応項目
この記事は元々 #404 にて導入されたものですが気になる点が幾つか。