mclow.lists added a comment.
A couple of notes.
- This change means that <regex> now requires C++11 (the new `__push` function
w/ the varargs). I don't know how important that is; but I'm pretty sure
libc++ currently provides `<regex>` in C++03 mode.
- This is an ABI change; existing code that was compiled with the "old"
`<regex>` implementation will not interoperate with this.
- I think that there may be some exception-safety issues in `__push`; if the
`push_back` throws, I think we leak.
================
Comment at: libcxx/include/regex:4642
+{
+ auto __ret = new _NodeType(std::forward<_Args>(__args)...);
+ __storage_.__push(__ret);
----------------
Why `auto` here?
How about `unique_ptr<_NodeType>` instead, and then
__storage_.__push(__ret.get());
return __ret.release()
https://reviews.llvm.org/D39308
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits