mirror of https://github.com/CGAL/cgal
int/rat dispatch
This commit is contained in:
parent
47b264eb58
commit
5f89d090b1
|
|
@ -91,9 +91,14 @@ public:
|
||||||
Expr(const BigInt& I) : RCExpr(new ConstRealRep(Real(I))) {}
|
Expr(const BigInt& I) : RCExpr(new ConstRealRep(Real(I))) {}
|
||||||
/// constructor for <tt>BigRat</tt>
|
/// constructor for <tt>BigRat</tt>
|
||||||
Expr(const BigRat& R) : RCExpr(new ConstRealRep(Real(R))) {}
|
Expr(const BigRat& R) : RCExpr(new ConstRealRep(Real(R))) {}
|
||||||
/// constructor for <tt>BigRat expression</tt>
|
/// constructor from expression template
|
||||||
template <class BigRatExpr, class = std::enable_if_t< boost::multiprecision::is_number_expression<BigRatExpr>::value> >
|
template <class TmplExpr,
|
||||||
Expr(const BigRatExpr& R) : RCExpr(new ConstRealRep(Real(BigRat(R)))) {}
|
class = std::enable_if_t<
|
||||||
|
boost::multiprecision::is_number_expression<TmplExpr>::value> >
|
||||||
|
Expr(const TmplExpr& R)
|
||||||
|
: RCExpr(new ConstRealRep(Real(
|
||||||
|
std::conditional_t<boost::multiprecision::number_category<TmplExpr>::value == boost::multiprecision::number_kind_integer,
|
||||||
|
BigInt, BigRat>(R)))) {}
|
||||||
|
|
||||||
/// constructor for <tt>BigFloat</tt>
|
/// constructor for <tt>BigFloat</tt>
|
||||||
Expr(const BigFloat& F) : RCExpr(new ConstRealRep(Real(F))) {}
|
Expr(const BigFloat& F) : RCExpr(new ConstRealRep(Real(F))) {}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue