Add make_unique and start using it
Created attachment 211946 [details] Patch
Committed r156000: <http://trac.webkit.org/changeset/156000>
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.
(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.