Revert "Revert "Merge to upstream r304942.""

This reverts commit 38a0d5af7e.

Test: make checkbuild
Test: ./run_tests.py
Test: ./run_tests.py --bitness 64
This commit is contained in:
Dan Albert
2018-01-17 14:21:02 -08:00
parent 38a0d5af7e
commit c79549b70e
1102 changed files with 19092 additions and 14798 deletions

View File

@@ -204,4 +204,20 @@ int main()
assert(s == "ABCD");
}
{ // test with a move iterator that returns char&&
typedef forward_iterator<const char*> It;
typedef std::move_iterator<It> MoveIt;
const char p[] = "ABCD";
std::string s;
s.append(MoveIt(It(std::begin(p))), MoveIt(It(std::end(p) - 1)));
assert(s == "ABCD");
}
{ // test with a move iterator that returns char&&
typedef const char* It;
typedef std::move_iterator<It> MoveIt;
const char p[] = "ABCD";
std::string s;
s.append(MoveIt(It(std::begin(p))), MoveIt(It(std::end(p) - 1)));
assert(s == "ABCD");
}
}