Bug 51122 - Assigning 0 to a RefPtr<> confuses Visual Studio 2010
Summary: Assigning 0 to a RefPtr<> confuses Visual Studio 2010
Status: RESOLVED DUPLICATE of bug 51116
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows Vista
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-15 11:42 PST by Jean-Luc Brouillet
Modified: 2010-12-15 18:53 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Luc Brouillet 2010-12-15 11:42:49 PST
When faced with:
       RefPtr<Node> node;
       node = 0;
the VS2010 compiler can't tell whether to cast the integral 0 to nullptr_t or to T*, e.g. to use either
       RefPtr& operator=(T*);
       RefPtr& operator=(std::nullptr_t) { clear(); return *this; }

If we intend WebKit to track C++ 0x, changing the assignments to use nullptr would be forward thinking.    If not,  #ifdef out "operator=(std::nullptr_t)" might be a solution, but I have not looked closely at the code to see the implications.

Note that VS2010 does not currently support __has_feature().
Comment 1 Darin Adler 2010-12-15 18:53:05 PST

*** This bug has been marked as a duplicate of bug 51116 ***