RESOLVED FIXED 121523
Add make_unique and start using it
https://bugs.webkit.org/show_bug.cgi?id=121523
Summary Add make_unique and start using it
Sam Weinig
Reported 2013-09-17 14:41:39 PDT
Add make_unique and start using it
Attachments
Patch (7.07 KB, patch)
2013-09-17 14:43 PDT, Sam Weinig
andersca: review+
Sam Weinig
Comment 1 2013-09-17 14:43:45 PDT
Sam Weinig
Comment 2 2013-09-17 14:44:59 PDT
Darin Adler
Comment 3 2013-09-18 18:30:35 PDT
Comment on attachment 211946 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=211946&action=review > Source/WTF/wtf/StdLibExtras.h:311 > +// For standard libraries that do not yet include it, this adds the std::make_unique > +// type. It is defined in the same namespaces as it would be in library that had the > +// support. But this is not conditional. How does it not cause a problem in libraries that do include it? Also, std::make_unique is a function template, not a type.
Sam Weinig
Comment 4 2013-09-18 18:43:49 PDT
(In reply to comment #3) > (From update of attachment 211946 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=211946&action=review > > > Source/WTF/wtf/StdLibExtras.h:311 > > +// For standard libraries that do not yet include it, this adds the std::make_unique > > +// type. It is defined in the same namespaces as it would be in library that had the > > +// support. > > But this is not conditional. How does it not cause a problem in libraries that do include it? When libraries that support it come into existence (e.g. we get a compile failure), I plan to add a conditional #if STANDARD_LIBRARY_SUPPORTS(...) or something like that. > Also, std::make_unique is a function template, not a type. Good point.
Note You need to log in before you can comment on or make changes to this bug.