Implement LWG issue 2061

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189345 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow 2013-08-27 13:03:03 +00:00
parent 5ec0ff81ce
commit af74651f61
3 changed files with 9 additions and 2 deletions

View File

@ -1016,7 +1016,7 @@ operator+(typename move_iterator<_Iter>::difference_type __n, const move_iterato
template <class _Iter>
inline _LIBCPP_INLINE_VISIBILITY
move_iterator<_Iter>
make_move_iterator(const _Iter& __i)
make_move_iterator(_Iter __i)
{
return move_iterator<_Iter>(__i);
}

View File

@ -30,10 +30,17 @@ test(It i)
int main()
{
{
char s[] = "1234567890";
test(input_iterator<char*>(s+5));
test(forward_iterator<char*>(s+5));
test(bidirectional_iterator<char*>(s+5));
test(random_access_iterator<char*>(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
}
}

View File

@ -112,7 +112,7 @@
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2047">2047</a></td><td>Incorrect "mixed" move-assignment semantics of unique_ptr</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2050">2050</a></td><td>Unordered associative containers do not use allocator_traits to define member types</td><td>Kona</td><td></td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2053">2053</a></td><td>Errors in regex bitmask types</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2061">2061</a></td><td>make_move_iterator and arrays</td><td>Kona</td><td></td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2061">2061</a></td><td>make_move_iterator and arrays</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2064">2064</a></td><td>More noexcept issues in basic_string</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2065">2065</a></td><td>Minimal allocator interface</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2067">2067</a></td><td>packaged_task should have deleted copy c'tor with const parameter</td><td>Kona</td><td>Complete</td></tr>