summaryrefslogtreecommitdiff
path: root/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp')
-rw-r--r--test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp b/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp
index c0a05e4209b3..02839abab337 100644
--- a/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp
+++ b/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp
@@ -18,9 +18,10 @@
#include <functional>
#include <random>
#include <cassert>
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#include <memory>
+#include "test_macros.h"
+
struct indirect_less
{
template <class P>
@@ -28,8 +29,6 @@ struct indirect_less
{return *x < *y;}
};
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
-
std::mt19937 randomness;
void test(int N)
@@ -53,7 +52,7 @@ int main()
test(10);
test(1000);
-#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#if TEST_STD_VER >= 11
{
const int N = 1000;
std::unique_ptr<int>* ia = new std::unique_ptr<int> [N];
@@ -65,5 +64,5 @@ int main()
assert(std::is_sorted(ia, ia+N, indirect_less()));
delete [] ia;
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif
}