Implement LWG#2566: Requirements on the first template parameter of container adaptors
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@263450 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -198,6 +198,7 @@ public:
|
|||||||
typedef typename container_type::reference reference;
|
typedef typename container_type::reference reference;
|
||||||
typedef typename container_type::const_reference const_reference;
|
typedef typename container_type::const_reference const_reference;
|
||||||
typedef typename container_type::size_type size_type;
|
typedef typename container_type::size_type size_type;
|
||||||
|
static_assert((is_same<_Tp, value_type>::value), "" );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
container_type c;
|
container_type c;
|
||||||
@@ -392,6 +393,7 @@ public:
|
|||||||
typedef typename container_type::reference reference;
|
typedef typename container_type::reference reference;
|
||||||
typedef typename container_type::const_reference const_reference;
|
typedef typename container_type::const_reference const_reference;
|
||||||
typedef typename container_type::size_type size_type;
|
typedef typename container_type::size_type size_type;
|
||||||
|
static_assert((is_same<_Tp, value_type>::value), "" );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
container_type c;
|
container_type c;
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ public:
|
|||||||
typedef typename container_type::reference reference;
|
typedef typename container_type::reference reference;
|
||||||
typedef typename container_type::const_reference const_reference;
|
typedef typename container_type::const_reference const_reference;
|
||||||
typedef typename container_type::size_type size_type;
|
typedef typename container_type::size_type size_type;
|
||||||
|
static_assert((is_same<_Tp, value_type>::value), "" );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
container_type c;
|
container_type c;
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ struct C
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
static_assert(( std::is_same<std::priority_queue<int>::container_type, std::vector<int> >::value), "");
|
static_assert(( std::is_same<std::priority_queue<int>::container_type, std::vector<int> >::value), "");
|
||||||
static_assert((std::is_same<std::priority_queue<double, std::deque<int> >::container_type, std::deque<int> >::value), "");
|
static_assert(( std::is_same<std::priority_queue<int, std::deque<int> >::container_type, std::deque<int> >::value), "");
|
||||||
static_assert((std::is_same<std::priority_queue<double, std::deque<int> >::value_type, int>::value), "");
|
static_assert(( std::is_same<std::priority_queue<int, std::deque<int> >::value_type, int>::value), "");
|
||||||
static_assert(( std::is_same<std::priority_queue<int>::reference, std::vector<int>::reference>::value), "");
|
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>::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>::size_type, std::vector<int>::size_type>::value), "");
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ struct C
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
static_assert(( std::is_same<std::queue<int>::container_type, std::deque<int> >::value), "");
|
static_assert(( std::is_same<std::queue<int>::container_type, std::deque<int> >::value), "");
|
||||||
static_assert((std::is_same<std::queue<double, std::vector<int> >::container_type, std::vector<int> >::value), "");
|
static_assert(( std::is_same<std::queue<int, std::vector<int> >::container_type, std::vector<int> >::value), "");
|
||||||
static_assert((std::is_same<std::queue<double, std::vector<int> >::value_type, int>::value), "");
|
static_assert(( std::is_same<std::queue<int, std::vector<int> >::value_type, int>::value), "");
|
||||||
static_assert(( std::is_same<std::queue<int>::reference, std::deque<int>::reference>::value), "");
|
static_assert(( std::is_same<std::queue<int>::reference, std::deque<int>::reference>::value), "");
|
||||||
static_assert(( std::is_same<std::queue<int>::const_reference, std::deque<int>::const_reference>::value), "");
|
static_assert(( std::is_same<std::queue<int>::const_reference, std::deque<int>::const_reference>::value), "");
|
||||||
static_assert(( std::is_same<std::queue<int>::size_type, std::deque<int>::size_type>::value), "");
|
static_assert(( std::is_same<std::queue<int>::size_type, std::deque<int>::size_type>::value), "");
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ struct C
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
static_assert(( std::is_same<std::stack<int>::container_type, std::deque<int> >::value), "");
|
static_assert(( std::is_same<std::stack<int>::container_type, std::deque<int> >::value), "");
|
||||||
static_assert((std::is_same<std::stack<double, std::vector<int> >::container_type, std::vector<int> >::value), "");
|
static_assert(( std::is_same<std::stack<int, std::vector<int> >::container_type, std::vector<int> >::value), "");
|
||||||
static_assert((std::is_same<std::stack<double, std::vector<int> >::value_type, int>::value), "");
|
static_assert(( std::is_same<std::stack<int, std::vector<int> >::value_type, int>::value), "");
|
||||||
static_assert(( std::is_same<std::stack<int>::reference, std::deque<int>::reference>::value), "");
|
static_assert(( std::is_same<std::stack<int>::reference, std::deque<int>::reference>::value), "");
|
||||||
static_assert(( std::is_same<std::stack<int>::const_reference, std::deque<int>::const_reference>::value), "");
|
static_assert(( std::is_same<std::stack<int>::const_reference, std::deque<int>::const_reference>::value), "");
|
||||||
static_assert(( std::is_same<std::stack<int>::size_type, std::deque<int>::size_type>::value), "");
|
static_assert(( std::is_same<std::stack<int>::size_type, std::deque<int>::size_type>::value), "");
|
||||||
|
|||||||
@@ -217,7 +217,7 @@
|
|||||||
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2559">2559</a></td><td>Error in LWG 2234's resolution</td><td>Jacksonville</td><td>Complete</td></tr>
|
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2559">2559</a></td><td>Error in LWG 2234's resolution</td><td>Jacksonville</td><td>Complete</td></tr>
|
||||||
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2560">2560</a></td><td><tt>is_constructible</tt> underspecified when applied to a function type</td><td>Jacksonville</td><td>Broken in 3.6; See r261653.</td></tr>
|
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2560">2560</a></td><td><tt>is_constructible</tt> underspecified when applied to a function type</td><td>Jacksonville</td><td>Broken in 3.6; See r261653.</td></tr>
|
||||||
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2565">2565</a></td><td><tt>std::function</tt>'s move constructor should guarantee nothrow for <tt>reference_wrapper</tt>s and function pointers</td><td>Jacksonville</td><td></td></tr>
|
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2565">2565</a></td><td><tt>std::function</tt>'s move constructor should guarantee nothrow for <tt>reference_wrapper</tt>s and function pointers</td><td>Jacksonville</td><td></td></tr>
|
||||||
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2566">2566</a></td><td>Requirements on the first template parameter of container adaptors</td><td>Jacksonville</td><td></td></tr>
|
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2566">2566</a></td><td>Requirements on the first template parameter of container adaptors</td><td>Jacksonville</td><td>Complete</td></tr>
|
||||||
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2571">2571</a></td><td>§[map.modifiers]/2 imposes nonsensical requirement on <tt>insert(InputIterator, InputIterator)</tt></td><td>Jacksonville</td><td>Complete</td></tr>
|
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2571">2571</a></td><td>§[map.modifiers]/2 imposes nonsensical requirement on <tt>insert(InputIterator, InputIterator)</tt></td><td>Jacksonville</td><td>Complete</td></tr>
|
||||||
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2572">2572</a></td><td>The remarks for <tt>shared_ptr::operator*</tt> should apply to <i>cv</i>-qualified <tt>void</tt> as well</td><td>Jacksonville</td><td>Complete</td></tr>
|
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2572">2572</a></td><td>The remarks for <tt>shared_ptr::operator*</tt> should apply to <i>cv</i>-qualified <tt>void</tt> as well</td><td>Jacksonville</td><td>Complete</td></tr>
|
||||||
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2574">2574</a></td><td>[fund.ts.v2] <tt>std::experimental::function::operator=(F&&)</tt> should be constrained</td><td>Jacksonville</td><td></td></tr>
|
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2574">2574</a></td><td>[fund.ts.v2] <tt>std::experimental::function::operator=(F&&)</tt> should be constrained</td><td>Jacksonville</td><td></td></tr>
|
||||||
@@ -238,7 +238,7 @@
|
|||||||
<!-- <tr><td></td><td></td><td></td><td></td></tr> -->
|
<!-- <tr><td></td><td></td><td></td><td></td></tr> -->
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p>Last Updated: 9-Mar-2016</p>
|
<p>Last Updated: 14-Mar-2016</p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user