1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 // explicit stack(const Container&);
17 #include "test_macros.h"
18 #if TEST_STD_VER >= 11
19 #include "test_convertible.h"
27 for (int i
= 0; i
< n
; ++i
)
34 typedef std::deque
<int> Container
;
35 typedef std::stack
<int> Q
;
36 Container d
= make
<Container
>(5);
38 assert(q
.size() == 5);
39 for (std::size_t i
= 0; i
< d
.size(); ++i
)
41 assert(q
.top() == d
[d
.size() - i
- 1]);
45 #if TEST_STD_VER >= 11
46 static_assert(!test_convertible
<Q
, const Container
&>(), "");