diff --git a/include/iterator b/include/iterator index b1bcdfc1..7bfd0498 100644 --- a/include/iterator +++ b/include/iterator @@ -138,6 +138,8 @@ template reverse_iterator operator+(typename reverse_iterator::difference_type n, const reverse_iterator& x); +template reverse_iterator make_reverse_iterator(Iterator i); // C++14 + template class back_insert_iterator { @@ -633,6 +635,15 @@ operator+(typename reverse_iterator<_Iter>::difference_type __n, const reverse_i return reverse_iterator<_Iter>(__x.base() - __n); } +#if _LIBCPP_STD_VER > 11 +template +inline _LIBCPP_INLINE_VISIBILITY +reverse_iterator<_Iter> make_reverse_iterator(_Iter __i) +{ + return reverse_iterator<_Iter>(__i); +} +#endif + template class _LIBCPP_TYPE_VIS_ONLY back_insert_iterator : public iterator + +// reverse_iterator + +// template reverse_iterator +// make_reverse_iterator(Iterator i); + +#include +#include + +#include "test_iterators.h" + +#if _LIBCPP_STD_VER > 11 + +template +void +test(It i) +{ + const std::reverse_iterator r = std::make_reverse_iterator(i); + assert(r.base() == i); +} + +int main() +{ + const char* s = "1234567890"; + random_access_iteratorb(s); + random_access_iteratore(s+10); + while ( b != e ) + test ( b++ ); +} +#else +int main () {} +#endif diff --git a/www/cxx1y_status.html b/www/cxx1y_status.html index 3ab81e07..c698463a 100644 --- a/www/cxx1y_status.html +++ b/www/cxx1y_status.html @@ -223,18 +223,18 @@ 2272quoted should use char_traits::eq for character comparisonIssaquahComplete 2278User-defined literals for Standard Library typesIssaquahComplete 2280begin / end for arrays should be constexpr and noexceptIssaquahComplete - 2285make_reverse_iteratorIssaquah + 2285make_reverse_iteratorIssaquahComplete 2299Effects of inaccessible key_compare::is_transparent type are not clearIssaquahComplete - 1450Contradiction in regex_constantsIssaquah + 1450Contradiction in regex_constantsIssaquahComplete 2003String exception inconsistency in erase.IssaquahComplete 2112User-defined classes that cannot be derived fromIssaquah 2132std::function ambiguityIssaquah 2182Container::[const_]reference types are misleadingly specifiedIssaquahComplete 2188Reverse iterator does not fully support targets that overload operator&IssaquahComplete 2193Default constructors for standard library containers are explicitIssaquah - 2205Problematic postconditions of regex_match and regex_searchIssaquah + 2205Problematic postconditions of regex_match and regex_searchIssaquahComplete 2213Return value of std::regex_replaceIssaquahComplete 2258a.erase(q1, q2) unable to directly return q2IssaquahComplete @@ -249,8 +249,8 @@ 2315weak_ptr should be movableIssaquah 2316weak_ptr::lock() should be atomicIssaquah 2317The type property queries should be UnaryTypeTraits returning size_tIssaquahComplete - 2320select_on_container_copy_construction() takes allocators, not containersIssaquah - 2322Associative(initializer_list, stuff) constructors are underspecifiedIssaquah + 2320select_on_container_copy_construction() takes allocators, not containersIssaquahComplete + 2322Associative(initializer_list, stuff) constructors are underspecifiedIssaquahComplete 2323vector::resize(n, t)'s specification should be simplifiedIssaquahComplete 2324Insert iterator constructors should use addressof()Issaquah 2329regex_match()/regex_search() with match_results should forbid temporary stringsIssaquahComplete @@ -263,7 +263,7 @@ 2350min, max, and minmax should be constexprIssaquahComplete 2356Stability of erasure in unordered associative containersIssaquah 2357Remaining "Assignable" requirementIssaquah - 2359How does regex_constants::nosubs affect basic_regex::mark_count()?Issaquah + 2359How does regex_constants::nosubs affect basic_regex::mark_count()?IssaquahComplete 2360reverse_iterator::operator*() is unimplementableIssaquah