[libcxx-commits] [PATCH] D92239: [libc++] Support simply `std::iterator_traits` in the iterator_traits test.
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Nov 27 10:52:34 PST 2020
Quuxplusone created this revision.
Quuxplusone added reviewers: ldionne, rsmith.
Quuxplusone added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
Quuxplusone requested review of this revision.
This follows on from D56698 <https://reviews.llvm.org/D56698>. Somehow, on my local OSX 10.14.6 machine, the name printed in the error messages for this test is just `std::`, not `std::__1::` or any other nested namespace. I copied the fix from commit 66e6e37447b183b1c8bac9330a4658530d2d49e6.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D92239
Files:
libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.fail.cpp
Index: libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.fail.cpp
===================================================================
--- libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.fail.cpp
+++ libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.fail.cpp
@@ -67,56 +67,56 @@
{
{
typedef std::iterator_traits<NotAnIteratorEmpty> T;
- typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
+ typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
}
{
typedef std::iterator_traits<NotAnIteratorNoDifference> T;
- typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
+ typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
}
{
typedef std::iterator_traits<NotAnIteratorNoValue> T;
- typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
+ typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
}
{
typedef std::iterator_traits<NotAnIteratorNoPointer> T;
- typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
+ typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
}
{
typedef std::iterator_traits<NotAnIteratorNoReference> T;
- typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
+ typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
}
{
typedef std::iterator_traits<NotAnIteratorNoCategory> T;
- typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
+ typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
+ typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std:{{.*}}:iterator_traits<{{.+}}>}}
}
return 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92239.308090.patch
Type: text/x-patch
Size: 8708 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201127/1d475028/attachment-0001.bin>
More information about the libcxx-commits
mailing list