diff --git a/Stream_support/include/CGAL/IO/io.h b/Stream_support/include/CGAL/IO/io.h index 3e16c8d18b6..949f2253539 100644 --- a/Stream_support/include/CGAL/IO/io.h +++ b/Stream_support/include/CGAL/IO/io.h @@ -132,7 +132,7 @@ public: break; } c = static_cast(i); - if(std::isdigit(c) || (c =='.') || (c =='E') || (c =='e') || (c =='-')){ + if(std::isdigit(c) || (c =='.') || (c =='E') || (c =='e') || (c =='+') || (c =='-')){ buffer += c; }else{ is.unget(); diff --git a/Stream_support/test/Stream_support/data/double.txt b/Stream_support/test/Stream_support/data/double.txt new file mode 100755 index 00000000000..83c4c0e8a01 --- /dev/null +++ b/Stream_support/test/Stream_support/data/double.txt @@ -0,0 +1,4 @@ ++1.2e+3 45 12 ++1.2e03 45 12 ++1.2e003 45 12 +-1.2e03 45 12 diff --git a/Stream_support/test/Stream_support/double.cpp b/Stream_support/test/Stream_support/double.cpp new file mode 100644 index 00000000000..076ae9767bc --- /dev/null +++ b/Stream_support/test/Stream_support/double.cpp @@ -0,0 +1,14 @@ +#include +#include +#include + + +int main() +{ + std::ifstream in("data/double.txt"); + CGAL::Simple_cartesian::Point_3 p; + while(in >> p){ + std::cout << p << std::endl; + } + return 0; +}