[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
Wed Dec 15 11:19:25 PST 2010


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





--- Comment #3 from Darin Adler <darin at apple.com>  2010-12-15 11:19:25 PST ---
We can control what overloading does for 0 if we add an operator= that takes an int.

This has the downside that it will allow us to compile if there’s a type mismatch, so it’s probably something we want to do only for Visual Studio 2010 for now.

Another option is to overload for int and make the overload private. That will give us an error on non-Visual-Studio-2010 platforms.

So I suggest something like this:

    public:
    #if HAS_REAL_NULLPTR
        RefPtr& operator=(int value) { ASSERT_UNUSED(value, !value); clear(); return *this; }
    #endif

Then we can add uses of nullptr. Then:

    private:
    #if !HAS_REAL_NULLPTR
        void operator=(int); // never define this
    #endif

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