Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel_23: Fix Issue 8140 #8175

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Filtered_kernel/include/CGAL/Lazy_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,18 @@ class Lazy_kernel_generic_base : protected internal::Enum_holder
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_>
Expand Down
1 change: 1 addition & 0 deletions Kernel_23/test/Kernel_23/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
12 changes: 12 additions & 0 deletions Kernel_23/test/Kernel_23/issue_8140.cpp
Original file line number Diff line number Diff line change
@@ -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;
}