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         (void)it2;
     34 #endif
     35     }
     36     {
     37         typedef std::istreambuf_iterator<wchar_t> T;
     38         T it;
     39         assert(it == T());
     40 #if TEST_STD_VER >= 11
     41         constexpr T it2;
     42         (void)it2;
     43 #endif
     44     }
     45 }
     46