post.pass.cpp revision bc8d3f97eb5c958007f2713238472e0c1c8fe02c
1//===----------------------------------------------------------------------===//
2//
3// ��������������������The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10// <iterator>
11
12// front_insert_iterator
13
14// front_insert_iterator<Cont> operator++(int);
15
16#include <iterator>
17#include <list>
18#include <cassert>
19
20template <class C>
21void
22test(C c)
23{
24    std::front_insert_iterator<C> i(c);
25    std::front_insert_iterator<C> r = i++;
26    r = 0;
27    assert(c.size() == 1);
28    assert(c.back() == 0);
29}
30
31int main()
32{
33    test(std::list<int>());
34}
35