aboutsummaryrefslogtreecommitdiff
path: root/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.fail.cpp
blob: 5e6cc5455998c0457b493b57c8e2e02f65f80ee8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//===----------------------------------------------------------------------===//
//
//                     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.
//
//===----------------------------------------------------------------------===//

// <iterator>

// class istream_iterator

// constexpr istream_iterator();

#include <iterator>
#include <cassert>

struct S { S(); }; // not constexpr 

int main()
{
#if __cplusplus >= 201103L
    {
    constexpr std::istream_iterator<S> it;
    }
#else
#error "C++11 only test"
#endif
}