• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 //  Copyright (c) 2020 Alexander Grund
3 //
4 //  Distributed under the Boost Software License, Version 1.0. (See
5 //  accompanying file LICENSE or copy at http://www.boost.org/LICENSE.txt)
6 //
7 
8 #include <fstream>
9 #include <utility>
10 
11 /// Check that the stdlib supports swapping and moving fstreams
12 /// (and by extension all other streams and streambufs)
check()13 void check()
14 {
15     std::fstream s1, s2;
16     s1.swap(s2);
17     s2 = std::move(s1);
18 }
19