blob: 38769e3fb0265f4b10774b69ad1f9bad8ff7808f [file] [log] [blame]
Dan Albert287553d2017-02-16 10:47:51 -08001//===----------------------------------------------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10// <stack>
11
12// stack& operator=(const stack& q);
13
14#include <stack>
15#include <cassert>
16
17template <class C>
18C
19make(int n)
20{
21 C c;
22 for (int i = 0; i < n; ++i)
23 c.push_back(i);
24 return c;
25}
26
27int main()
28{
29 std::stack<int> q(make<std::deque<int> >(5));
30 std::stack<int> q2;
31 q2 = q;
32 assert(q2 == q);
33}