Home | History | Annotate | Download | only in istreambuf.iterator.cons
      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 #include "test_macros.h"
     24 
     25 int main()
     26 {
     27     {
     28         typedef std::istreambuf_iterator<char> T;
     29         T it;
     30         assert(it == T());
     31 #if TEST_STD_VER >= 11
     32         constexpr T it2;
     33 #endif
     34     }
     35     {
     36         typedef std::istreambuf_iterator<wchar_t> T;
     37         T it;
     38         assert(it == T());
     39 #if TEST_STD_VER >= 11
     40         constexpr T it2;
     41 #endif
     42     }
     43 }
     44