C++ Logo

STD-PROPOSALS

Advanced search

Subject: [std-proposals] Add std::basic_ios::setfail() setter function
From: Tomek Rożen (tomek.rozen_at_[hidden])
Date: 2019-10-25 07:27:05


Hi,

I have been creating several operator>>(istream&...) lately. When parsing
fails the failbit flag is set:
    is.setstate(std::ios_base::failbit);
It seems quite verbose, a more convenient way would be just:
    is.setfail();

Do you think it's something worth considering?

Thanks,
Tomek



STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org

Standard Proposals Archives on Google Groups