cgal/Snap_rounding_2
Laurent Rineau 269ae1ca61 Fix the uses of std::basic_ios::bad(), and use fail() instead.
bad() implies fail() but std::basic_ios::operator! is actually equivalent
to std::basic_ios::fail(), not bad().

For example,
    std::ifstream is(argv[1]);
    if (is.bad()) {
is probably wrong because, in case the file does not exist, only the failbit it set,
and not the badbit.

Other example:
   double x;
   is >> x;
If the stream 'is' does not contains a string that can represent a double,
then failbit is set (and maybe the eofbit if the stream is actually too
short), but not the badbit.

bad() can be used, in case fail() returned true, to discriminate between a
I/O error and a logical error.

See:
  http://en.cppreference.com/w/cpp/io/basic_ios/operator_bool
  http://en.cppreference.com/w/cpp/io/ios_base/iostate
2013-12-12 16:13:40 +01:00
..
demo/Snap_rounding_2/Qt3 Turn QPL into LGPLv3+ 2012-01-13 16:33:35 +00:00
doc/Snap_rounding_2 use \cgalCite instead of \cite 2013-08-05 18:25:26 +02:00
examples/Snap_rounding_2 No need to #include <CGAL/basic.h> 2011-03-13 17:09:46 +00:00
include/CGAL Add a static assertion for SAVED_OBJECT to avoid misuse 2013-10-29 10:22:22 +01:00
package_info/Snap_rounding_2 New license.txt files (eol changes) 2013-02-19 16:46:39 +01:00
test/Snap_rounding_2 Fix the uses of std::basic_ios::bad(), and use fail() instead. 2013-12-12 16:13:40 +01:00
Snap_rounding_2.dxy updated 2006-08-03 16:14:38 +00:00
dont_submit Put doc/ in the global dont_submit file 2013-08-20 10:57:03 +02:00