//===----------------------------------------------------------------------===// // // 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. // //===----------------------------------------------------------------------===// // // istreambuf_iterator // istreambuf_iterator& // istreambuf_iterator::operator++(); #include #include #include int main() { { std::istringstream inf("abc"); std::istreambuf_iterator i(inf); assert(*i == 'a'); assert(*++i == 'b'); assert(*++i == 'c'); assert(++i == std::istreambuf_iterator()); } { std::wistringstream inf(L"abc"); std::istreambuf_iterator i(inf); assert(*i == L'a'); assert(*++i == L'b'); assert(*++i == L'c'); assert(++i == std::istreambuf_iterator()); } }