mirror of https://github.com/CGAL/cgal
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:
parent
1c400420ce
commit
aad47904b6
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue