mirror of https://github.com/CGAL/cgal
- Moved the CGAL_convert_to<>() general template here.
(will be in kernel_basic.h normally).
This commit is contained in:
parent
04f7fddf58
commit
d1bb64cb4a
|
|
@ -535,7 +535,12 @@ CGAL_number_type_tag(CGAL_Interval_nt_advanced)
|
|||
// Finally we source the CGAL_convert_to<CGAL_Interval_nt_advanced>()
|
||||
// functions from other NTs, when necessary.
|
||||
// CGAL_convert_to<CGAL_Interval_nt>() is templated below, only specialized
|
||||
// for double.
|
||||
// for double (handled genericaly anyway).
|
||||
|
||||
// The following big template should be put in number_utils.h, imho.
|
||||
template <class NTtarget, class NTsource>
|
||||
inline NTtarget CGAL_convert_to (const NTsource & source)
|
||||
{ return NTtarget(source); }
|
||||
|
||||
#ifdef CGAL_GMPZ_H
|
||||
#include <CGAL/Interval_arithmetic/IA_Gmpz.h>
|
||||
|
|
@ -562,7 +567,7 @@ CGAL_number_type_tag(CGAL_Interval_nt_advanced)
|
|||
#endif
|
||||
|
||||
template <class FT>
|
||||
inline CGAL_Interval_nt CGAL_convert_to<CGAL_Interval_nt>(const FT &z)
|
||||
inline CGAL_Interval_nt CGAL_convert_to(const FT &z)
|
||||
{
|
||||
CGAL_FPU_set_rounding_to_infinity();
|
||||
CGAL_Interval_nt tmp(CGAL_convert_to<CGAL_Interval_nt_advanced>(z));
|
||||
|
|
@ -576,12 +581,10 @@ inline CGAL_Interval_nt CGAL_convert_to<CGAL_Interval_nt>(const FT &z)
|
|||
// inline ET CGAL_convert_to (const CT & ct)
|
||||
// { return ET(ct); }
|
||||
|
||||
inline CGAL_Interval_nt_advanced CGAL_convert_to<CGAL_Interval_nt_advanced>
|
||||
(const double d)
|
||||
{ return CGAL_Interval_nt_advanced(d); }
|
||||
// inline CGAL_Interval_nt_advanced CGAL_convert_to (const double d)
|
||||
// { return CGAL_Interval_nt_advanced(d); }
|
||||
|
||||
inline CGAL_Interval_nt CGAL_convert_to<CGAL_Interval_nt>
|
||||
(const double d)
|
||||
{ return CGAL_Interval_nt(d); }
|
||||
// inline CGAL_Interval_nt CGAL_convert_to (const double d)
|
||||
// { return CGAL_Interval_nt(d); }
|
||||
|
||||
#endif // CGAL_INTERVAL_ARITHMETIC_H
|
||||
|
|
|
|||
Loading…
Reference in New Issue