[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-07-02 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Committed as revision 336132. https://reviews.llvm.org/D48616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-29 Thread Louis Dionne via Phabricator via cfe-commits
ldionne accepted this revision. ldionne added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D48616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-28 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 153432. mclow.lists marked 3 inline comments as done. mclow.lists added a comment. Update in response to comments. https://reviews.llvm.org/D48616 Files: include/memory include/string test/std/strings/basic.string/string.cons/copy_assignment.pass.

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-28 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked 5 inline comments as done. mclow.lists added inline comments. Comment at: include/string:836 _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS -basic_string(const _Tp& __t, size_type __pos, size_type __n, - const allocator_

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-28 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added inline comments. Comment at: include/string:856 +_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS +explicit basic_string(const _Tp& __t, const allocator_type& __a); + tcanens wrote: > ldionne wrote: > > I think this `explicit` shou

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-28 Thread Tim Song via Phabricator via cfe-commits
tcanens added inline comments. Comment at: include/string:856 +_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS +explicit basic_string(const _Tp& __t, const allocator_type& __a); + ldionne wrote: > I think this `explicit` shouldn't be there, too

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-28 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added inline comments. Comment at: include/string:836 _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS -basic_string(const _Tp& __t, size_type __pos, size_type __n, - const allocator_type& __a = allocator_type(), -

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-27 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 153178. mclow.lists marked 2 inline comments as done. mclow.lists added a comment. Update diff per Louis' suggestion. Remove noexcepts from the synopsis. https://reviews.llvm.org/D48616 Files: include/memory include/string test/std/strings/basic.s

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-27 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists marked 5 inline comments as done. mclow.lists added inline comments. Comment at: include/memory:5647 + typename __void_t::type, + typename __void_t().allocate(size_t(0)))>::type + > ldionne wrote: > Sorry -- still not very fluent with

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-27 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added inline comments. Comment at: include/string:842 +explicit basic_string(const _Tp& __t, + typename enable_if<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, void>::type* = 0); + mclow.lists wrote: > ldion

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-27 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/string:842 +explicit basic_string(const _Tp& __t, + typename enable_if<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value, void>::type* = 0); + ldionne wrote: > Is th

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-27 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. More missed `noexcept`s. Comment at: include/string:279 +template +size_type find_first_of(const T& t, size_type pos = 0) const noexcept; // C++17 size_type find_first_of(const value_type* s, size_type pos, size_type n) const noexcep

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-27 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. LGTM. All comments/questions are just for my education. Other things I did: double-check that you changed all the functions changed by https://cplusplus.github.io/LWG/lwg-defects.html#2946. Comment at: include/memory:5647 + typename __void_t::ty

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-27 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 153097. mclow.lists added a comment. Update the tests from 2946 - they are removed for C++03 https://reviews.llvm.org/D48616 Files: include/memory include/string test/std/strings/basic.string/string.cons/copy_assignment.pass.cpp test/std/strings

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-27 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp:161 +std::string s = " !"; +assert(s.rfind({"abc", 1}) == std::string::npos); +} These tests don't work in C++03; they'll need t

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-26 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 153001. mclow.lists added a comment. Updated the `__is_allocator` type trait to work all the way back to C++03 Added a bunch of tests from issue2946. I think this has all the pieces that it needs now. https://reviews.llvm.org/D48616 Files: include/me

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-26 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 152995. mclow.lists added a comment. Remove a bunch of `noexcept`s that I missed the first time. Put in an error message to be checked in one of the failing deduction cases that was lacking it. Address STL's comments. https://reviews.llvm.org/D48616 F

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-26 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT added inline comments. Comment at: test/std/strings/basic.string/string.cons/string_view_deduction.fail.cpp:26 +// The deduction guide shall not participate in overload resolution if Allocator is +// is a type that does not qualify as an allocator. +

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-26 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Ok, for some reason, the four tests that I *added* didn't get into the diff. https://reviews.llvm.org/D48616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[PATCH] D48616: Implement LWG 2946, 3075 and 3076

2018-06-26 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. mclow.lists added reviewers: EricWF, ldionne, STL_MSFT. A massive amount of doinking around in . https://cplusplus.github.io/LWG/issue2946 https://cplusplus.github.io/LWG/issue3075 https://cplusplus.github.io/LWG/issue3076 This is not quite right yet, but