@@ -285,7 +285,9 @@ void test01()
static_assert(test_property<is_nothrow_swappable,
std::queue<ThrowCopyConsClass>>(true), "");
static_assert(test_property<is_nothrow_swappable,
- std::priority_queue<ThrowCopyConsClass>>(true), "");
+ std::priority_queue<ThrowCopyConsClass,
+ std::vector<ThrowCopyConsClass>,
+ comps::CompareNoThrowCopyable>>(true), "");
static_assert(test_property<is_nothrow_swappable,
std::stack<ThrowCopyConsClass>>(true), "");
static_assert(test_property<is_nothrow_swappable,
@@ -55,6 +55,13 @@ namespace funny {
{
friend void swap(F3&, F3) {}
};
+
+ struct DummyCmp
+ {
+ template<class T>
+ bool operator()(const T&, const T&) const
+ { return false; }
+ };
}
void test01()
{
@@ -152,7 +159,9 @@ void test01()
static_assert(test_property<is_swappable,
std::priority_queue<int>[1][2][3]>(true), "");
static_assert(test_property<is_swappable,
- std::priority_queue<construct::Nontrivial>>(true), "");
+ std::priority_queue<construct::Nontrivial,
+ std::vector<construct::Nontrivial>,
+ funny::DummyCmp>>(true), "");
static_assert(test_property<is_swappable,
std::stack<int>>(true), "");
static_assert(test_property<is_swappable,
@@ -68,7 +68,7 @@ using std::string;
using std::string_view;
using std::vector;
-struct B { };
+struct B { bool operator<(const B&) const; };
static_assert( output_iterator< array<int, 1>::iterator, int > );
static_assert( output_iterator< array<B, 1>::iterator, B > );