Closed
Bug 208449
Opened 22 years ago
Closed 22 years ago
MSVC++ .net 2003: nsFrameManager.cpp(1497) compile error
Categories
(Core :: XPCOM, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla1.5alpha
People
(Reporter: ian, Assigned: dbaron)
References
Details
(Whiteboard: [patch])
Attachments
(1 file, 1 obsolete file)
4.84 KB,
patch
|
sicking
:
review+
jag+mozilla
:
superreview+
|
Details | Diff | Splinter Review |
--------------------------------------------------------------------------------
nsFrameManager.cpp
e:/Trees\Mozilla.1\mozilla\layout\html\base\src\nsFrameManager.cpp(1497) : error
C2666: 'operator`!='' : 2 overloads have similar conversions
../../../../dist\include\xpcom\nsAutoPtr.h(1236): could be 'NSCAP_BOOL o
perator !=<nsStyleContext,nsStyleContext>(const nsRefPtr<T> &,const U *)'
with
[
T=nsStyleContext,
U=nsStyleContext
]
or 'built-in C++ operator!=(nsStyleContext *, nsStyleContext *)'
while trying to match the argument list '(nsRefPtr<T>, nsStyleContext *)
'
with
[
T=nsStyleContext
]
note: qualification adjustment (const/volatile) may be causing the ambig
uity
make[6]: *** [nsFrameManager.obj] Error 2
--------------------------------------------------------------------------------
Based on the patch in bug 208439, here's an untested patch that may fix this:
Index: nsAutoPtr.h
===================================================================
RCS file: /cvsroot/mozilla/xpcom/base/nsAutoPtr.h,v
retrieving revision 1.9
diff --unified=4 -d -p -r1.9 nsAutoPtr.h
--- nsAutoPtr.h 5 Jun 2003 17:55:33 -0000 1.9
+++ nsAutoPtr.h 5 Jun 2003 19:35:39 -0000
@@ -379,9 +379,9 @@ operator!=( const U* lhs, const nsAutoPt
// This is defined by an autoconf test, but VC++ also has a bug that
// prevents us from using these. (It also, fortunately, has the bug
// that we don't need them either.)
-#ifdef _MSC_VER
+#if defined(_MSC_VER) && (_MSC_VER < 1310)
#define NSCAP_DONT_PROVIDE_NONCONST_OPEQ
#endif
#ifndef NSCAP_DONT_PROVIDE_NONCONST_OPEQ
@@ -806,9 +806,9 @@ operator!=( const U* lhs, const nsAutoAr
// This is defined by an autoconf test, but VC++ also has a bug that
// prevents us from using these. (It also, fortunately, has the bug
// that we don't need them either.)
-#ifdef _MSC_VER
+#if defined(_MSC_VER) && (_MSC_VER < 1310)
#define NSCAP_DONT_PROVIDE_NONCONST_OPEQ
#endif
#ifndef NSCAP_DONT_PROVIDE_NONCONST_OPEQ
@@ -1255,9 +1255,9 @@ operator!=( const U* lhs, const nsRefPtr
// This is defined by an autoconf test, but VC++ also has a bug that
// prevents us from using these. (It also, fortunately, has the bug
// that we don't need them either.)
-#ifdef _MSC_VER
+#if defined(_MSC_VER) && (_MSC_VER < 1310)
#define NSCAP_DONT_PROVIDE_NONCONST_OPEQ
#endif
#ifndef NSCAP_DONT_PROVIDE_NONCONST_OPEQ
Assignee | ||
Comment 1•22 years ago
|
||
I think this is what we really want.
Assignee | ||
Updated•22 years ago
|
Attachment #125020 -
Flags: superreview?(jaggernaut)
Attachment #125020 -
Flags: review?(bugmail)
Assignee | ||
Updated•22 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [patch]
Target Milestone: --- → mozilla1.5alpha
Reporter | ||
Comment 2•22 years ago
|
||
Yeah, that does seem more sensible.
Reporter | ||
Comment 3•22 years ago
|
||
In fact while you're at it, why not remove the following from nsAutoPtr.h and
rely on its definition in nsCOMPtr.h as well:
#ifdef _MSC_VER
#define NSCAP_FEATURE_INLINE_STARTASSIGNMENT
// under VC++, we win by inlining StartAssignment
// Also under VC++, at the highest warning level, we are overwhelmed with
warnings
// about (unused) inline functions being removed. This is to be expected with
// templates, so we disable the warning.
#pragma warning( disable: 4514 )
#endif
Assignee | ||
Updated•22 years ago
|
Attachment #125021 -
Flags: superreview?(jaggernaut)
Attachment #125021 -
Flags: review?(bugmail)
Assignee | ||
Updated•22 years ago
|
Attachment #125020 -
Flags: superreview?(jaggernaut)
Attachment #125020 -
Flags: review?(bugmail)
Updated•22 years ago
|
Attachment #125021 -
Flags: superreview?(jaggernaut) → superreview+
Attachment #125021 -
Flags: review?(bugmail) → review+
Assignee | ||
Comment 5•22 years ago
|
||
Fix checked in to trunk, 2003-06-05 16:43 -0700.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•