1 //===----------------------------------------------------------------------===// 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 // <iterator> 11 12 // istreambuf_iterator 13 // 14 // istreambuf_iterator() throw(); 15 // 16 // All specializations of istreambuf_iterator shall have a trivial copy constructor, 17 // a constexpr default constructor and a trivial destructor. 18 19 #include <iterator> 20 #include <sstream> 21 #include <cassert> 22 23 int main() 24 { 25 { 26 typedef std::istreambuf_iterator<char> T; 27 T it; 28 assert(it == T()); 29 #if __cplusplus >= 201103L 30 constexpr T it2; 31 #endif 32 } 33 { 34 typedef std::istreambuf_iterator<wchar_t> T; 35 T it; 36 assert(it == T()); 37 #if __cplusplus >= 201103L 38 constexpr T it2; 39 #endif 40 } 41 } 42