diff --git a/include/iterator b/include/iterator index 52bc0de9e..979a9645f 100644 --- a/include/iterator +++ b/include/iterator @@ -1016,7 +1016,7 @@ operator+(typename move_iterator<_Iter>::difference_type __n, const move_iterato template inline _LIBCPP_INLINE_VISIBILITY move_iterator<_Iter> -make_move_iterator(const _Iter& __i) +make_move_iterator(_Iter __i) { return move_iterator<_Iter>(__i); } diff --git a/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp b/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp index 19535c760..06834981e 100644 --- a/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp +++ b/test/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.nonmember/make_move_iterator.pass.cpp @@ -30,10 +30,17 @@ test(It i) int main() { + { char s[] = "1234567890"; test(input_iterator(s+5)); test(forward_iterator(s+5)); test(bidirectional_iterator(s+5)); test(random_access_iterator(s+5)); test(s+5); + } + { + int a[] = {1,2,3,4}; + std::make_move_iterator(a+4); + std::make_move_iterator(a); // test for LWG issue 2061 + } } diff --git a/www/cxx1y_status.html b/www/cxx1y_status.html index 661243498..e68f624d5 100644 --- a/www/cxx1y_status.html +++ b/www/cxx1y_status.html @@ -112,7 +112,7 @@ 2047Incorrect "mixed" move-assignment semantics of unique_ptrKonaComplete 2050Unordered associative containers do not use allocator_traits to define member typesKona 2053Errors in regex bitmask typesKonaComplete - 2061make_move_iterator and arraysKona + 2061make_move_iterator and arraysKonaComplete 2064More noexcept issues in basic_stringKonaComplete 2065Minimal allocator interfaceKonaComplete 2067packaged_task should have deleted copy c'tor with const parameterKonaComplete