Implement LWG#2684: 'priority_queue lacking comparator typedef'. We already did this, just added tests

llvm-svn: 274243
This commit is contained in:
Marshall Clow 2016-06-30 16:03:50 +00:00
parent 8a75ee9317
commit c8afc869b0
2 changed files with 5 additions and 1 deletions

View File

@ -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;

View File

@ -287,7 +287,7 @@
<tr><td><a href="http://wg21.link/LWG2673">2673</a></td><td>status() effects cannot be implemented as specified</td><td>Oulu</td><td></td></tr>
<tr><td><a href="http://wg21.link/LWG2674">2674</a></td><td>Bidirectional iterator requirement on path::iterator is very expensive</td><td>Oulu</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2683">2683</a></td><td>filesystem::copy() says "no effects"</td><td>Oulu</td><td></td></tr>
<tr><td><a href="http://wg21.link/LWG2684">2684</a></td><td>priority_queue lacking comparator typedef</td><td>Oulu</td><td></td></tr>
<tr><td><a href="http://wg21.link/LWG2684">2684</a></td><td>priority_queue lacking comparator typedef</td><td>Oulu</td><td>Complete</td></tr>
<tr><td><a href="http://wg21.link/LWG2685">2685</a></td><td>shared_ptr deleters must not throw on move construction</td><td>Oulu</td><td></td></tr>
<tr><td><a href="http://wg21.link/LWG2687">2687</a></td><td>{inclusive,exclusive}_scan misspecified</td><td>Oulu</td><td></td></tr>
<tr><td><a href="http://wg21.link/LWG2688">2688</a></td><td>clamp misses preconditions and has extraneous condition on result</td><td>Oulu</td><td></td></tr>