summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/containers/container.adaptors
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2016-06-30 16:03:50 +0000
committerMarshall Clow <mclow.lists@gmail.com>2016-06-30 16:03:50 +0000
commitc8afc869b0f99c379c00cdec6875ac611e9f5dba (patch)
tree9c6f93d321d47e2a0392b939034e69122964d038 /libcxx/test/std/containers/container.adaptors
parent8a75ee9317910faf90e947ffd37b1c77d5d68bdd (diff)
downloadbcm5719-llvm-c8afc869b0f99c379c00cdec6875ac611e9f5dba.tar.gz
bcm5719-llvm-c8afc869b0f99c379c00cdec6875ac611e9f5dba.zip
Implement LWG#2684: 'priority_queue lacking comparator typedef'. We already did this, just added tests
llvm-svn: 274243
Diffstat (limited to 'libcxx/test/std/containers/container.adaptors')
-rw-r--r--libcxx/test/std/containers/container.adaptors/priority.queue/types.pass.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/types.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/types.pass.cpp
index 802cd0029b1..5690e104ee3 100644
--- a/libcxx/test/std/containers/container.adaptors/priority.queue/types.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/priority.queue/types.pass.cpp
@@ -15,6 +15,7 @@
// {
// public:
// typedef Container container_type;
+// typedef Compare value_compare; // LWG#2684
// typedef typename container_type::value_type value_type;
// typedef typename container_type::reference reference;
// typedef typename container_type::const_reference const_reference;
@@ -54,6 +55,9 @@ int main()
static_assert(( std::is_same<std::priority_queue<int>::reference, std::vector<int>::reference>::value), "");
static_assert(( std::is_same<std::priority_queue<int>::const_reference, std::vector<int>::const_reference>::value), "");
static_assert(( std::is_same<std::priority_queue<int>::size_type, std::vector<int>::size_type>::value), "");
+ static_assert(( std::is_same<std::priority_queue<int>::value_compare, std::less<int> >::value), "");
+ static_assert(( std::is_same<std::priority_queue<int, std::deque<int> >::value_compare, std::less<int> >::value), "");
+ static_assert(( std::is_same<std::priority_queue<int, std::deque<int>, std::greater<int> >::value_compare, std::greater<int> >::value), "");
static_assert(( std::uses_allocator<std::priority_queue<int>, std::allocator<int> >::value), "");
static_assert((!std::uses_allocator<std::priority_queue<int, C>, std::allocator<int> >::value), "");
test t;
OpenPOWER on IntegriCloud