[Webkit-unassigned] [Bug 51116] Building webkit with Visual Studio 2010 fails due to ambiguous 'operator =' methods in RefPtr.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 17 09:43:28 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=51116





--- Comment #9 from Adam Roben (aroben) <aroben at apple.com>  2010-12-17 09:43:28 PST ---
(In reply to comment #8)
> As an experiment I tried Alexey's suggestion and made the following changes, and webkit built fine with vs2010.
> 
> NullPtr.h:
> 
> #if !defined(_MSC_VER) || _MSC_VER < 1600
> #ifndef __has_feature
>     #define __has_feature(feature) 0
> #endif
> 
> #if !__has_feature(cxx_nullptr)
> 
> namespace std {
>     class nullptr_t { };
> }
> 
> extern std::nullptr_t nullptr;
> 
> #endif
> #endif
> 
> RefPtr.h:
> 
> 
> #if !defined(_MSC_VER) || _MSC_VER < 1600
>         RefPtr& operator=(std::nullptr_t) { clear(); return *this; }
> #endif
> 
> Much easier than my 450 changes!

Removing the nullptr_t version just for new versions of MSVC seems very fragile. People will add uses of that assignment operator in cross-platform code without realizing they're breaking MSVC.

-- 
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