diff options
Diffstat (limited to 'test/std/containers/container.adaptors/queue/queue.defn/assign_copy.pass.cpp')
| -rw-r--r-- | test/std/containers/container.adaptors/queue/queue.defn/assign_copy.pass.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/std/containers/container.adaptors/queue/queue.defn/assign_copy.pass.cpp b/test/std/containers/container.adaptors/queue/queue.defn/assign_copy.pass.cpp new file mode 100644 index 0000000000000..e9afa0b8c61f3 --- /dev/null +++ b/test/std/containers/container.adaptors/queue/queue.defn/assign_copy.pass.cpp @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <queue> + +// queue& operator=(const queue& q); + +#include <queue> +#include <cassert> + +template <class C> +C +make(int n) +{ + C c; + for (int i = 0; i < n; ++i) + c.push_back(i); + return c; +} + +int main() +{ + std::queue<int> q(make<std::deque<int> >(5)); + std::queue<int> q2; + q2 = q; + assert(q2 == q); +} |
