Page MenuHomePhabricator

Update operator+ for basic_string (P1165R1)
Needs ReviewPublic

Authored by zoecarver on Feb 26 2019, 8:36 AM.

Details

Summary

This patch re-arranges the + operator overloads and implements P1165R1.

Currently, it is a bit of a WIP because I had some questions about why it is causing tests to fail. I spent a long time trying to debug why test_neg_one fails but couldn't figure it out. I thought maybe @EricWF would know, otherwise I will keep debugging it.

Diff Detail

Event Timeline

zoecarver created this revision.Feb 26 2019, 8:36 AM

How do the tests look? Do they need updating to ensure that we have the (new) correct behavior?

include/string
4168

Yes, it should, because in C++03 we don't have move semantics.

zoecarver marked an inline comment as done.Mar 12 2019, 11:11 AM

@mclow.lists Yes, I need to update the tests. I also want to try to figure out why test_neg_one is failing. I will look into that today.

include/string
4168

Sounds good. I will disable overloads that use std::move for C++03.