Merge pull request #8175 from afabri/Kernel_23-fix_issue_8140-GF

Kernel_23: Fix Issue 8140
This commit is contained in:
Laurent Rineau 2024-05-15 16:12:03 +02:00
commit ab37b326d0
3 changed files with 19 additions and 0 deletions

View File

@ -280,12 +280,18 @@ public:
C Cf() const { return C(); }
#include <CGAL/Kernel/interface_macros.h>
// Useless meta-function, added to workaround a bug with Visual C++ 2022 and before
// See issue https://github.com/CGAL/cgal/issues/8140
template < typename T >
struct Handle { typedef T type; };
};
template < typename EK_, typename AK_, typename E2A_, typename Kernel_ >
class Lazy_kernel_base
: public Lazy_kernel_generic_base<EK_, AK_, E2A_, Kernel_>

View File

@ -14,6 +14,7 @@ create_single_source_cgal_program("Filtered_homogeneous.cpp")
create_single_source_cgal_program("Homogeneous.cpp")
create_single_source_cgal_program("issue_129.cpp")
create_single_source_cgal_program("issue_3301.cpp")
create_single_source_cgal_program("issue_8140.cpp")
create_single_source_cgal_program("Kernel_checker.cpp")
create_single_source_cgal_program("Lazy_kernel.cpp")
create_single_source_cgal_program("origin_3.cpp")

View File

@ -0,0 +1,12 @@
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
int main() { // For testing, we just print the combinations of types
using Kernel = CGAL::Exact_predicates_exact_constructions_kernel;
using Vec_3 = Kernel::Vector_3;
using Cp_fnc3 = Vec_3(*)(const Vec_3&, const Vec_3&);
Cp_fnc3 f = static_cast<Cp_fnc3>(&CGAL::cross_product<Kernel>);
Vec_3 v1, v2;
Vec_3 v = f(v1, v2);
return 0;
}