add a small example showing the overload problem when result_type

is defined in Null_functor
This commit is contained in:
Sébastien Loriot 2011-06-30 17:19:48 +00:00
parent 68b628fe5e
commit 2a6ca3b67f
3 changed files with 19 additions and 1 deletions

1
.gitattributes vendored
View File

@ -1843,6 +1843,7 @@ Kernel_23/examples/Kernel_23/cartesian_converter.cpp -text
Kernel_23/include/CGAL/functions_on_enums.h -text
Kernel_23/include/CGAL/internal/Projection_traits_3.h -text
Kernel_23/test/Kernel_23/CMakeLists.txt -text
Kernel_23/test/Kernel_23/overload_bug.cpp -text
Kernel_d/doc_tex/Kernel_d/hypercube.png -text
Kernel_d/doc_tex/Kernel_d_ref/Kernel_Compute_coordinate_d.tex -text
Kernel_d/doc_tex/Kernel_d_ref/Kernel_Less_coordinate_d.tex -text

View File

@ -33,5 +33,5 @@ if ( CGAL_FOUND )
create_single_source_cgal_program( Simple_cartesian.cpp )
create_single_source_cgal_program( Simple_homogeneous.cpp )
create_single_source_cgal_program( test_kernel__.cpp )
create_single_source_cgal_program( overload_bug.cpp )
endif()

View File

@ -0,0 +1,17 @@
#include <CGAL/Simple_cartesian.h>
#include <CGAL/intersection_2.h>
typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::Point_2 Point_2;
struct Segment_2D : public CGAL::Segment_2<Kernel>
{
Segment_2D(const ::Point_2 &p,
const ::Point_2 &q) : CGAL::Segment_2<Kernel>(p, q) {}
};
int main(){
Segment_2D s1(Point_2(0,0),Point_2(1,0));
Segment_2D s2(Point_2(0,0),Point_2(0,1));
CGAL::intersection(s1,s2);
}