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 // UNSUPPORTED: c++98, c++03
11 
12 // <fstream>
13 
14 // template <class charT, class traits = char_traits<charT> >
15 // class basic_ifstream
16 
17 // basic_ifstream(basic_ifstream&& rhs);
18 
19 #include <fstream>
20 #include <cassert>
21 
main()22 int main()
23 {
24     {
25         std::ifstream fso("test.dat");
26         std::ifstream fs = move(fso);
27         double x = 0;
28         fs >> x;
29         assert(x == 3.25);
30     }
31     {
32         std::wifstream fso("test.dat");
33         std::wifstream fs = move(fso);
34         double x = 0;
35         fs >> x;
36         assert(x == 3.25);
37     }
38 }
39