Skip to content

Instantly share code, notes, and snippets.

@bo0ts
Created March 31, 2015 14:33
Show Gist options
  • Save bo0ts/f916b9f0cae1bbb53a41 to your computer and use it in GitHub Desktop.
Save bo0ts/f916b9f0cae1bbb53a41 to your computer and use it in GitHub Desktop.
A check for constructors in default CGAL Kernel
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Simple_homogeneous.h>
#include <CGAL/Homogeneous.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
typedef CGAL::Exact_predicates_inexact_constructions_kernel EPIC;
typedef CGAL::Exact_predicates_exact_constructions_kernel EPEC;
#include <CGAL/Cartesian_d.h>
#include <CGAL/Homogeneous_d.h>
// Cannot test but is documented See PR #33
// #include <CGAL/Epick_d.h>
#include <CGAL/Exact_circular_kernel_2.h>
typedef CGAL::Exact_circular_kernel_2 ECK2;
#include <CGAL/Exact_spherical_kernel_3.h>
typedef CGAL::Exact_spherical_kernel_3 ESK3;
#include <CGAL/Circular_kernel_2.h>
#include <CGAL/Spherical_kernel_3.h>
template<typename T>
void test_copy() {
T t; // default constructible
auto t2{t}; // copy constructible
(void)t2;
}
int main()
{
using namespace CGAL;
test_copy<Simple_cartesian<double>>();
test_copy<Cartesian<double>>();
test_copy<Simple_homogeneous<double>>();
test_copy<Homogeneous<double>>();
test_copy<Cartesian_d<Dimension_tag<5>>>();
test_copy<Homogeneous_d<Dimension_tag<5>>>();
// test_copy<Epick_d<Dimension_tag<5>>>();
test_copy<EPIC>();
test_copy<EPEC>();
test_copy<ECK2>();
test_copy<ESK3>();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment