summaryrefslogtreecommitdiffstats
path: root/libcxx/test
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2014-10-27 20:26:25 +0000
committerEric Fiselier <eric@efcs.ca>2014-10-27 20:26:25 +0000
commit847ee13171e34a7cebf3cf9f7498a60f0cac8a4d (patch)
tree187edd70ff03d85a746c386b123921c2891818cf /libcxx/test
parent8ef921a48b2cf8a4e4923a6210d2e96060ebce1d (diff)
downloadbcm5719-llvm-847ee13171e34a7cebf3cf9f7498a60f0cac8a4d.tar.gz
bcm5719-llvm-847ee13171e34a7cebf3cf9f7498a60f0cac8a4d.zip
Fix use of operator comma in is_permutation and delete comma operator for test iterators.
The comma operators in the test iterators give better error messages when they are deleted as opposed to not defined. Delete these functions when possible. llvm-svn: 220715
Diffstat (limited to 'libcxx/test')
-rw-r--r--libcxx/test/support/test_iterators.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/libcxx/test/support/test_iterators.h b/libcxx/test/support/test_iterators.h
index 71509083e13..b91653dc9ff 100644
--- a/libcxx/test/support/test_iterators.h
+++ b/libcxx/test/support/test_iterators.h
@@ -13,6 +13,12 @@
#include <iterator>
#include <cassert>
+#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS
+#define DELETE_FUNCTION = delete
+#else
+#define DELETE_FUNCTION
+#endif
+
template <class It>
class output_iterator
{
@@ -40,7 +46,7 @@ public:
{output_iterator tmp(*this); ++(*this); return tmp;}
template <class T>
- void operator,(T const &);
+ void operator,(T const &) DELETE_FUNCTION;
};
template <class It>
@@ -76,7 +82,7 @@ public:
{return !(x == y);}
template <class T>
- void operator,(T const &);
+ void operator,(T const &) DELETE_FUNCTION;
};
template <class T, class U>
@@ -128,7 +134,7 @@ public:
{return !(x == y);}
template <class T>
- void operator,(T const &);
+ void operator,(T const &) DELETE_FUNCTION;
};
template <class T, class U>
@@ -179,7 +185,7 @@ public:
{bidirectional_iterator tmp(*this); --(*this); return tmp;}
template <class T>
- void operator,(T const &);
+ void operator,(T const &) DELETE_FUNCTION;
};
template <class T, class U>
@@ -241,7 +247,7 @@ public:
reference operator[](difference_type n) const {return it_[n];}
template <class T>
- void operator,(T const &);
+ void operator,(T const &) DELETE_FUNCTION;
};
template <class T, class U>
@@ -423,4 +429,6 @@ inline Iter base(comma_iterator<Iter> i) { return i.base(); }
template <class Iter> // everything else
inline Iter base(Iter i) { return i; }
+#undef DELETE_FUNCTION
+
#endif // ITERATORS_H
OpenPOWER on IntegriCloud