mirror of
https://github.com/rehlds/rechecker.git
synced 2024-12-26 20:35:28 +03:00
fc73912229
Added support ReHLDS API 3.X Refactoring
22 lines
345 B
C++
22 lines
345 B
C++
#pragma once
|
|
|
|
#include <ios>
|
|
|
|
class IosFlagSaver {
|
|
public:
|
|
explicit IosFlagSaver(std::ostream& _ios) :
|
|
ios(_ios),
|
|
f(_ios.flags()) {
|
|
}
|
|
~IosFlagSaver() {
|
|
ios.flags(f);
|
|
}
|
|
|
|
IosFlagSaver(const IosFlagSaver &rhs) = delete;
|
|
IosFlagSaver& operator= (const IosFlagSaver& rhs) = delete;
|
|
|
|
private:
|
|
std::ostream& ios;
|
|
std::ios::fmtflags f;
|
|
};
|