Re: [PATCH] D21320: Alternative to D1332

2016-06-14 Thread Eric Fiselier via cfe-commits
EricWF added a comment. If we choose to special case this I think we *need* to do it with a new specialization of `default_delete`, not using the primary template. The primary templates defines `default_delete::pointer` as `T*[N]`, which `T*` will not convert to. That means this patch still rej

Re: [PATCH] D21320: Alternative to D1332

2016-06-14 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT resigned from this revision. STL_MSFT removed a reviewer: STL_MSFT. STL_MSFT added a comment. My only concern is that the tests in test/std shouldn't exercise this bug in the standard, as MSVC's implementation doesn't special-case it. If you'd like to special-case it in your product cod

Re: [PATCH] D21320: Alternative to D1332

2016-06-13 Thread Eric Fiselier via cfe-commits
EricWF added a comment. My personal preference would be to diagnose `std::default_delete` and `std::unique_ptr`, but I'll defer to your judgment here. An alternative implementation would be to provide a "default_delete" specialization. (Note that adding this specialization does not change the

Re: [PATCH] D21320: Alternative to D1332

2016-06-13 Thread Marshall Clow via cfe-commits
mclow.lists updated this revision to Diff 60651. mclow.lists added a comment. @EricWF pointed out that this didn't actually suppress the warning that we were trying to suppress. All I can say is that it did several weeks ago when I wrote it. Apparently clang has gotten pickier. Use tag dispatch

[PATCH] D21320: Alternative to D1332

2016-06-13 Thread Marshall Clow via cfe-commits
mclow.lists created this revision. mclow.lists added reviewers: EricWF, STL_MSFT. mclow.lists added a subscriber: cfe-commits. There's a bug in the standard, where the default deleter will always call `delete x`; even if `x` is an array type. This shows up for `shared_ptr`. Do the right thing,