diff options
author | Andras Becsi <andras.becsi@digia.com> | 2013-04-04 18:13:30 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-05 15:25:32 +0200 |
commit | 4ed0c1e637a6d4f6e951121e74551236f03f7a1d (patch) | |
tree | 1aa89ba982f50ab81ffb21966315868ce491d9c1 /Source/JavaScriptCore/debugger/Debugger.cpp | |
parent | 4378e48208f76ec39fdb32dbdbb0e03dd804bf65 (diff) | |
download | qtwebkit-4ed0c1e637a6d4f6e951121e74551236f03f7a1d.tar.gz |
Move definition of nested classes that inherit enclosing class outside class definition.
https://bugs.webkit.org/show_bug.cgi?id=113454
http://trac.webkit.org/changeset/147345
Patch by Han Shen <shenhan@google.com> on 2013-04-01
Reviewed by Benjamin Poulain.
HashMap.h does not build on GCC 4.8. Inside this file,
HashMapKeysProxy and HashMapValuesProxy are defined as nested
class inside HashMap - which is legal - the illegal part is that
these 2 classes inherit HashMap, that is the enclosing class, that
causes "reference to in-complete definition" error.
The fix is to move outside the definition of these 2 classes, and
leave only declaration part inside HashMap as is illustrated below -
template class <typename T>
class HashMap {
... ...
... ...
private:
class HashMapKeysProxy;
// ERROR - nested class inherits enclosing class.
class HashMapKeysProxy : private HashMap {
... ...
};
... ...
... ...
class HashMapKeysProxy : private HashMap {
... ...
};
... ...
... ...
};
Fixed as below:
template class <typename T>
class HashMap {
... ...
... ...
private:
class HashMapKeysProxy;
class HashMapValuesProxy;
... ...
... ...
};
template <typename T>
class HashMap<T>::HashMapKeysProxy : private HashMap<T> {
... ...
};
template <typename T>
class HashMap<T>::HashMapValuesProxy : private HashMap<T> {
... ...
};
Task-number: QTBUG-30527
Change-Id: Ib20e5a4625c4648d057b490ca48a217623891ab1
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'Source/JavaScriptCore/debugger/Debugger.cpp')
0 files changed, 0 insertions, 0 deletions