Closed Bug 1493781 Opened Last year Closed Last year

Add an example to IsBaseOf to indicate that it is reflexive

Categories

(Core :: MFBT, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

Details

Attachments

(1 file)

Adding something to the comment on IsBaseOf would be nice:
  mozilla::IsBaseOf<A, A>::value is true;

I think this is a good example to have because my understanding is that a class is not derived from itself, and thus is not actually a base class of itself, so the name of this predicate is not accurate.
IsBaseOf<A, A> holds despite the fact that a class is not actually a
base class of itself.
Comment on attachment 9011568 [details]
Bug 1493781 - Add a comment to IsBaseOf indicating that it is reflexive

Nathan Froyd [:froydnj] has approved the revision.
Attachment #9011568 - Flags: review+
FWIW, my confusion about this led me to write an incorrect patch for bug 1493276 and bug 1493226. (Though fortunately I caught this before putting the patches up for review.)
Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/abff79205da2
Add a comment to IsBaseOf indicating that it is reflexive r=froydnj
https://hg.mozilla.org/mozilla-central/rev/abff79205da2
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.