This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Throwing std::ios_base::failure on formatted input with gcc 6.2
- From: Edward Diener <eldlistmailingz at tropicsoft dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 26 Oct 2016 07:45:01 -0400
- Subject: Throwing std::ios_base::failure on formatted input with gcc 6.2
- Authentication-results: sourceware.org; auth=none
If I have code asuch as:
std::stringstream ss;
ss.exceptions(std::ios_base::failbit | std::ios_base::badbit);
char c;
ss >> c;
I would except an exception of std::ios_base::failure to be thrown yet
gcc 6.2 is throwing some other exception. Is there a reason for this ?