This is an archive of the discontinued LLVM Phabricator instance.

Implement revision to LWG#2758
ClosedPublic

Authored by mclow.lists on Sep 11 2016, 10:33 PM.

Details

Summary

Fix some ambiguities that were added in the latest draft standard.

Normally, I would wait for these to be voted upon at a committee meeting (November), but the current draft standard is broken, and this should fix it. (And if it doesn't, we want to know about it soonest)

Diff Detail

Event Timeline

mclow.lists retitled this revision from to Implement revision to LWG#2758.
mclow.lists updated this object.
mclow.lists added reviewers: EricWF, howard.hinnant.
mclow.lists added a subscriber: cfe-commits.
mclow.lists added inline comments.Sep 11 2016, 10:35 PM
include/string
615

These bits will be removed.

test/std/strings/basic.string/string.modifiers/string_append/string_view_size_size.pass.cpp
10

This file will be renamed to T_size_size.pass.cpp. I didn't do that before uploading the diff because it would make it harder to see just what has changed.

test/std/strings/basic.string/string.modifiers/string_assign/string_view_size_size.pass.cpp
10

This file will be renamed to "T_size_size.pass.cpp". I didn't do that before uploading the diff because it would make it harder to see just what has changed.

EricWF accepted this revision.Sep 15 2016, 8:16 PM
EricWF edited edge metadata.

The new overloads taking string_view's need to guard against self-aliasing string_views. Once that is fixed I would double check that your tests for !is_convertible<_Tp const&, const _CharT*> still work.

Other than that this LGTM.

include/string
613

The discussion for LWG 2758 gives a replace test case for this condition. Could you add that test to our suite?

This revision is now accepted and ready to land.Sep 15 2016, 8:16 PM
mclow.lists closed this revision.Sep 24 2016, 3:56 PM

Landed as revision 282342.

include/string
613

I think I have an equivalent test - passing a non-const char * .
That should be about line 5994 of string_replace/size_size_T_size_size.pass.cpp

test/std/strings/basic.string/string.modifiers/string_insert/size_T_size_size.pass.cpp