mirror of https://github.com/CGAL/cgal
add function to display the exact backend as a string
This commit is contained in:
parent
492133a0c6
commit
2991e85cdd
|
|
@ -317,6 +317,25 @@ template < typename ET >
|
||||||
struct Exact_type_selector : Exact_field_selector< ET > {};
|
struct Exact_type_selector : Exact_field_selector< ET > {};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
constexpr const char* exact_nt_backend_string()
|
||||||
|
{
|
||||||
|
switch(Default_exact_nt_backend)
|
||||||
|
{
|
||||||
|
case GMP_BACKEND:
|
||||||
|
return "GMP_BACKEND";
|
||||||
|
case GMPXX_BACKEND:
|
||||||
|
return "GMPXX_BACKEND";
|
||||||
|
case BOOST_GMP_BACKEND:
|
||||||
|
return "BOOST_GMP_BACKEND";
|
||||||
|
case BOOST_BACKEND:
|
||||||
|
return "BOOST_BACKEND";
|
||||||
|
case LEDA_BACKEND:
|
||||||
|
return "LEDA_BACKEND";
|
||||||
|
case MP_FLOAT_BACKEND:
|
||||||
|
return "MP_FLOAT_BACKEND";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} } // namespace CGAL::internal
|
} } // namespace CGAL::internal
|
||||||
|
|
||||||
#undef CGAL_EXACT_SELECTORS_SPECS
|
#undef CGAL_EXACT_SELECTORS_SPECS
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ create_single_source_cgal_program("unsigned.cpp")
|
||||||
create_single_source_cgal_program("utilities.cpp")
|
create_single_source_cgal_program("utilities.cpp")
|
||||||
create_single_source_cgal_program("Exact_rational.cpp")
|
create_single_source_cgal_program("Exact_rational.cpp")
|
||||||
create_single_source_cgal_program("Mpzf_new.cpp")
|
create_single_source_cgal_program("Mpzf_new.cpp")
|
||||||
|
create_single_source_cgal_program("check_exact_backend.cpp")
|
||||||
|
|
||||||
if( CGAL_Core_FOUND )
|
if( CGAL_Core_FOUND )
|
||||||
create_single_source_cgal_program( "CORE_Expr_ticket_4296.cpp" )
|
create_single_source_cgal_program( "CORE_Expr_ticket_4296.cpp" )
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,6 @@ int main()
|
||||||
#endif
|
#endif
|
||||||
( Default_exact_nt_backend!=MP_FLOAT_BACKEND || (std::is_same_v<CGAL::Exact_integer,CGAL::MP_Float> && std::is_same_v<CGAL::Exact_rational,CGAL::Quotient<CGAL::MP_Float>>) )
|
( Default_exact_nt_backend!=MP_FLOAT_BACKEND || (std::is_same_v<CGAL::Exact_integer,CGAL::MP_Float> && std::is_same_v<CGAL::Exact_rational,CGAL::Quotient<CGAL::MP_Float>>) )
|
||||||
);
|
);
|
||||||
|
|
||||||
|
std::cout << "Exact backend is " << exact_nt_backend_string() << "\n";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue