We require rvalue support anyways, so let's use it.
ldionne Mordante var-const huixie90
- Group Reviewers
- rGe0b3356e67a9: [libc++] Enable rvalue overloads for pair in C++03
I guess this somehow changed the c++ 03 behaviour. it used to make copies on 1. function parameters 2. constructor initialisers
I was going to say this:
I don't think it is, actually, because in C++03 make_pair is explicitly specified like
template< class T1, class T2 > std::pair<T1,T2> make_pair( T1 t, T2 u );
IMO the rest of these changes are OK, but this one does changes our C++03 API (which one day we will deprecate if my dreams become reality).
But then, @philnik reminded me that libc++ was originally built to implement the C++11 standard even on top of a C++03 compiler, and that is actually one of the things we tell users. In other words, we never really faithfully implement C++03 anyways. For example, we provide all kinds of things like std::shared_ptr in C++03 mode, and those are all C++11 features.
So yeah, I think it's fine to drop this. And it only reinforces my desire to get a discussion started on deprecating C++03 support entirely.
This one is definitely good. std::get(pair) was added in C++11/14 depending on the overloads, and we probably only did that before rvalue references as a C++03 extension in Clang.
Side comment, but we do seem to have quite a few files that haven't moved to the new license. You could make a NFC with those without review if you want.