Movatterモバイル変換


[0]ホーム

URL:


Issue 149 - WG21 CWG Issues
Title
Accessibility and ambiguity
Status
tc1
Section
7.3.12 [conv.ptr]
Submitter
Nathan Sidwell

Created on1999-07-31.00:00:00 last changed277 months ago

Messages

msg216 (view)
Date: 1999-10-15.00:00:00

Proposed resolution (10/00):

  • 7.6.1.7 [expr.dynamic.cast] paragraph 8,bullet 2: change "unambiguous public base class" to "unambiguousand public base class"
  • 11.7.3 [class.virtual] paragraph 5: change"the class in the return type... is an unambiguous direct orindirect base class... and is accessible inD" to "theclass in the return type... is an unambiguous and accessible director indirect base class..."

msg111 (view)
Date: 2022-11-20.07:54:16

The Standard uses confusing terminology when referring toaccessibility in connection with ambiguity. For instance:

7.3.12 [conv.ptr] paragraph 3:

IfB is an inaccessible or ambiguous base ...
7.6.1.7 [expr.dynamic.cast] paragraph 8:
... has an unambiguous public base ...
11.7.3 [class.virtual] paragraph 5:
... is an unambiguous direct or indirect base ... andis accessible ...
14.4 [except.handle] paragraph 3:
not involving conversions to pointers to private orprotected or ambiguous classes

The phrase "unambiguous public base" is unfortunate as itcould mean either "anunambiguous base not considering accessibility, which is public"or "anunambiguous base considering only the publicly accessible bases."I believe theformer interpretation correct, as accessibility is applied after visibility(11.8 [class.access] paragraph 4)and ambiguity is described in terms of visibility(6.5.2 [class.member.lookup] paragraph 2).

Suggested Resolution:Use the phrases "public and unambiguous,""accessible and unambiguous,""non-public or ambiguous," or "inaccessible or ambiguous" as appropriate.

Proposed resolution (10/00):

  • 7.6.1.7 [expr.dynamic.cast] paragraph 8,bullet 2: change "unambiguous public base class" to "unambiguousand public base class"
  • 11.7.3 [class.virtual] paragraph 5: change"the class in the return type... is an unambiguous direct orindirect base class... and is accessible inD" to "theclass in the return type... is an unambiguous and accessible director indirect base class..."

History
DateUserActionArgs
2003-04-25 00:00:00adminsetstatus: dr -> tc1
2000-11-18 00:00:00adminsetstatus: ready -> dr
2000-05-21 00:00:00adminsetstatus: review -> ready
2000-02-23 00:00:00adminsetmessages: +msg216
2000-02-23 00:00:00adminsetstatus: open -> review
1999-07-31 00:00:00admincreate

[8]ページ先頭

©2009-2026 Movatter.jp