[Webkit-unassigned] [Bug 113454] New: GCC 4.8 error - C++ nested class inheriting enclosing class
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Mar 27 16:09:02 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=113454
Summary: GCC 4.8 error - C++ nested class inheriting enclosing
class
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: Linux
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: New Bugs
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: shenhan at google.com
Han Shen <shenhan at google.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #195425| |review?
Flag| |
Created an attachment (id=195425)
--> (https://bugs.webkit.org/attachment.cgi?id=195425&action=review)
The is a patch.
In WebKit/Source/WTF/wtf/HashMap.h, HashMapKeysProxy and HashMapValuesProxy are defined as nested class inside HashMap, meanwhile they inherit the enclosing HashMap class, which by any means is not legal.
GCC 4.8 complains about this.
So the original code is like -
template class <typename T>
class HashMap {
... ...
... ...
private:
class HashMapKeysProxy;
class HashMapKeysProxy : private HashMap {
};
... ...
... ...
};
My fix is to change the above to:
template class <typename T>
class HashMap {
... ...
... ...
private:
class HashMapKeysProxy;
... ...
... ...
};
template <typename T>
class HashMap<T>::HashMapKeysProxy : private HashMap<T> {
... ...
};
The patch is attached.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list