[Webkit-unassigned] [Bug 124866] VS2010 doesn't like std::make_unique
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 26 12:51:52 PST 2013
https://bugs.webkit.org/show_bug.cgi?id=124866
--- Comment #4 from Sam Weinig <sam at webkit.org> 2013-11-26 12:50:20 PST ---
(In reply to comment #3)
> (In reply to comment #2)
> > What compile error does it cause? It may just be the missing #include of <wtf/StdLibExtras.h>
> Even with that included, it makes this error many, many times:
> 8>c:\cygwin\webkit\source\webcore\platform\graphics\TiledBackingStore.h(45): error C2780: '_Unique_if<T>::_Unknown_bound std::make_unique(size_t)' : expects 1 arguments - 0 provided
> 8> C:\cygwin\webkit\WebKitBuild\Debug_WinCairo\include\private\wtf/StdLibExtras.h(412) : see declaration of 'std::make_unique'
>
> My solution fixes it and doesn't seem to break anything on any other systems.
But it changes the semantics.
std::make_unique<TiledBackingStoreBackend>() is the equivalent of (new TiledBackingStoreBackend());
nullptr is the equivalent of NULL.
So the old code always had a non-null TiledBackingStoreBackend and now it will.
A better work around would to be to stop using a default value for the parameter and just have two constructors.
1) TiledBackingStore(TiledBackingStoreClient*);
2) TiledBackingStore(TiledBackingStoreClient*, std::unique_ptr<TiledBackingStoreBackend>);
Just make sure that in #1's implementation you create the backend.
--
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