Specialize read_float_or_quotient for mpq_class.

Some solution based on Fraction_traits would be more elegant, but this
is how it is done for leda_rational, so let us remain consistent for
now.
This commit is contained in:
Marc Glisse 2016-10-27 20:54:39 +02:00
parent 1c400420ce
commit aad47904b6
1 changed files with 13 additions and 0 deletions

View File

@ -273,6 +273,19 @@ public:
}
};
// Copied from leda_rational.h
namespace internal {
// See: Stream_support/include/CGAL/IO/io.h
template <typename ET>
void read_float_or_quotient(std::istream & is, ET& et);
template <>
inline void read_float_or_quotient(std::istream & is, mpq_class& et)
{
internal::read_float_or_quotient<mpz_class,mpq_class>(is, et);
}
} // namespace internal
} //namespace CGAL
#undef CGAL_CHECK_GMP_EXPR