post.pass.cpp revision f5256e16dfc425c1d466f6308d4026d529ce9e0b
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// insert_iterator 13 14// insert_iterator<Cont> operator++(int); 15 16#include <iterator> 17#include <vector> 18#include <cassert> 19 20template <class C> 21void 22test(C c) 23{ 24 std::insert_iterator<C> i(c, c.end()); 25 std::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::vector<int>()); 34} 35