[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


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

        RefPtr& operator=(int value) { ASSERT_UNUSED(value, !value); clear(); return *this; }

Then we can add uses of nullptr. Then:

        void operator=(int); // never define this

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