1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 // template <class charT, class traits = char_traits<charT> >
12 // class basic_istream;
14 // basic_istream(basic_istream const& rhs) = delete;
15 // basic_istream& operator=(basic_istream const&) = delete;
18 #include <type_traits>
22 : public std::basic_istream
<char>
24 typedef std::basic_istream
<char> base
;
26 test_istream(test_istream
&& s
)
27 : base(std::move(s
)) // OK
31 test_istream
& operator=(test_istream
&& s
) {
32 base::operator=(std::move(s
)); // OK
36 test_istream(test_istream
const& s
)
37 : base(s
) // expected-error {{call to deleted constructor of 'std::basic_istream<char>'}}
41 test_istream
& operator=(test_istream
const& s
) {
42 base::operator=(s
); // expected-error {{call to deleted member function 'operator='}}