19 using Path = std::string;
23 static constexpr iostate goodbit = 0x0;
24 static constexpr iostate eofbit = 0x1;
25 static constexpr iostate failbit = 0x2;
26 static constexpr iostate badbit = 0x4;
27 iostate _state = goodbit;
29 void setstate(iostate state) { _state = _state | state; }
32 explicit operator bool()
const {
return !fail(); }
33 bool operator!()
const {
return fail(); }
35 bool good()
const {
return _state == goodbit; }
36 bool eof()
const {
return _state & eofbit; }
37 bool fail()
const {
return (_state & (badbit | failbit)) != 0; }
38 bool bad()
const {
return (_state & badbit) != 0; }
This class reuses the parts of std::ios API but doesn't provide heavy stream functionnality (ie...