2
0
mirror of https://github.com/boostorg/nowide.git synced 2026-02-14 12:52:17 +00:00
Files
nowide/config/check_movable_fstreams.cpp
Flamefire fccb720589 Include 'Fix update of standalone branch
Use regular rm because  ignores untracked files'
2021-12-21 14:46:45 +00:00

19 lines
434 B
C++

//
// Copyright (c) 2020 Alexander Grund
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE or copy at http://www.boost.org/LICENSE.txt)
//
#include <fstream>
#include <utility>
/// Check that the stdlib supports swapping and moving fstreams
/// (and by extension all other streams and streambufs)
void check()
{
std::fstream s1, s2;
s1.swap(s2);
s2 = std::move(s1);
}