Closed Bug 208449 Opened 22 years ago Closed 22 years ago

MSVC++ .net 2003: nsFrameManager.cpp(1497) compile error

Categories

(Core :: XPCOM, defect, P2)

x86
Windows 2000
defect

Tracking

()

RESOLVED FIXED
mozilla1.5alpha

People

(Reporter: ian, Assigned: dbaron)

References

Details

(Whiteboard: [patch])

Attachments

(1 file, 1 obsolete file)

-------------------------------------------------------------------------------- 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
Attached patch patch (obsolete) — Splinter Review
I think this is what we really want.
Attachment #125020 - Flags: superreview?(jaggernaut)
Attachment #125020 - Flags: review?(bugmail)
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [patch]
Target Milestone: --- → mozilla1.5alpha
Yeah, that does seem more sensible.
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
Attached patch patchSplinter Review
good idea
Attachment #125020 - Attachment is obsolete: true
Attachment #125021 - Flags: superreview?(jaggernaut)
Attachment #125021 - Flags: review?(bugmail)
Attachment #125020 - Flags: superreview?(jaggernaut)
Attachment #125020 - Flags: review?(bugmail)
Attachment #125021 - Flags: superreview?(jaggernaut) → superreview+
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.

Attachment

General

Created:
Updated:
Size: