cgal/Arithmetic_kernel/test/Arithmetic_kernel/Get_arithmetic_kernel.cpp

36 lines
901 B
C++

#include <iostream>
#include <CGAL/basic.h>
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Get_arithmetic_kernel.h>
#if defined(CGAL_HAS_DEFAULT_ARITHMETIC_KERNEL)
#include <CGAL/Test/_test_arithmetic_kernel.h>
int main() {
typedef CGAL::Arithmetic_kernel AK;
typedef AK::Integer Integer;
typedef AK::Rational Rational;
typedef AK::Bigfloat_interval BFI;
{
typedef CGAL::Get_arithmetic_kernel<Integer>::Arithmetic_kernel AK_;
CGAL_static_assertion((boost::is_same<AK,AK_>::value));
}
{
typedef CGAL::Get_arithmetic_kernel<Rational>::Arithmetic_kernel AK_;
CGAL_static_assertion((boost::is_same<AK,AK_>::value));
}
{
typedef CGAL::Get_arithmetic_kernel<BFI>::Arithmetic_kernel AK_;
CGAL_static_assertion((boost::is_same<AK,AK_>::value));
}
return 0;
}
#else
#warning CGAL has no default CGAL::Arithmetic kernel
int main() { return 0; }
#endif