PR libstdc++/91871
* testsuite/util/testsuite_hooks.h
(conversion::iterator_to_const_iterator()): Do not return an invalid
iterator. Test direct-initialization and direct-list-initialization
as well as implicit conversion.
From-SVN: r276091
+2019-09-24 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/91871
+ * testsuite/util/testsuite_hooks.h
+ (conversion::iterator_to_const_iterator()): Do not return an invalid
+ iterator. Test direct-initialization and direct-list-initialization
+ as well as implicit conversion.
+
2019-09-23 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/91788 (partial)
typedef typename _Container::const_iterator const_iterator;
// Implicit conversion iterator to const_iterator.
- static const_iterator
+ static void
iterator_to_const_iterator()
{
_Container v;
- const_iterator it = v.begin();
- const_iterator end = v.end();
- return it == end ? v.end() : it;
+ const_iterator i __attribute__((unused)) = const_iterator(v.begin());
+ const_iterator j __attribute__((unused)) = true ? i : v.begin();
+#if __cplusplus >= 201103L
+ const_iterator k __attribute__((unused)) { v.begin() };
+#endif
}
};