Revision 3e4fcd8d900cb4ad5da466878edf9a0b59993c0a authored by Laurent Rineau on 13 July 2016, 14:30:07 UTC, committed by Laurent Rineau on 13 July 2016, 14:30:07 UTC
That is a follow-up to the following commit:

> commit 6b51b12ab50ae9d2c0cd7afc3ce5e2d7cbb42608
> Author: Laurent Rineau <laurent.rineau@cgal.org>
> Date:   Fri Oct 4 16:42:13 2013 +0200
>
>     Fix the case when FT is mpq_class
>
>     If x and w are mpq_class objects, then the type of x/w is not mpq_class,
>     but only a proxy type that is implicitly convertible to
>     mpq_class. With the type deduction, CGAL::make_array(x/w, y/w,
>     z/w) will not create an array<mpq_class> but an array of the proxy type.
>
>     That creates the following compilation error, in a ternary operator:
>
>     - with clang:
>     include/CGAL/Cartesian/Vector_3.h:78:25: error: incompatible operand types ('array<__gmp_expr<[...], struct __gmp_binary_expr<class __gmp_expr<mpq_t, mpq_t>, class __gmp_expr<mpq_t, mpq_t>, struct __gmp_binary_divides>>, [...]>' and 'array<__gmp_expr<[...], __mpq_struct [1]>, [...]>')
>         : base( w != FT_(1) ? CGAL::make_array(x/w, y/w, z/w)
>                             ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     - with g++:
>     include/CGAL/Cartesian/Vector_3.h:78:25: error: no match for ternary 'operator?:' (operand types are 'bool', 'std::array<__gmp_expr<__mpq_struct [1], __gmp_binary_expr<__gmp_expr<__mpq_struct [1], __mpq_struct [1]>, __gmp_expr<__mpq_struct [1], __mpq_struct [1]>, __gmp_binary_divides> >, 3ul>', and 'std::array<__gmp_expr<__mpq_struct [1], __mpq_struct [1]>, 3ul>')
>          : base( w != FT_(1) ? CGAL::make_array(x/w, y/w, z/w)
>                              ^
>
>     The fix is to specify the template argument of CGAL::make_array.

The first patch in 2013 was on `Vector_3`, but `Vector_2` also suffers
from the issue.
1 parent 843cde6
History
File Mode Size
AABB_tree
Advancing_front_surface_reconstruction
Algebraic_foundations
Algebraic_kernel_d
Algebraic_kernel_for_circles
Algebraic_kernel_for_spheres
Alpha_shapes_2
Alpha_shapes_3
Apollonius_graph_2
Arithmetic_kernel
Arrangement_on_surface_2
BGL
Barycentric_coordinates_2
Boolean_set_operations_2
Bounding_volumes
Box_intersection_d
CGAL_Core
CGAL_ImageIO
CGAL_ipelets
Cartesian_kernel
Circular_kernel_2
Circular_kernel_3
Circulator
Combinatorial_map
Cone_spanners_2
Conic_2
Convex_decomposition_3
Convex_hull_2
Convex_hull_3
Convex_hull_d
Distance_2
Distance_3
Documentation
Envelope_2
Envelope_3
Filtered_kernel
Generator
Geomview
GraphicsView
HalfedgeDS
Hash_map
Homogeneous_kernel
Inscribed_areas
Installation
Interpolation
Intersections_2
Intersections_3
Interval_skip_list
Interval_support
Inventor
Jet_fitting_3
Kernel_23
Kernel_d
Kinetic_data_structures
Kinetic_framework
LEDA
Linear_cell_complex
MacOSX
Maintenance
Matrix_search
Mesh_2
Mesh_3
Minkowski_sum_2
Minkowski_sum_3
Miscellany
Modifier
Modular_arithmetic
Nef_2
Nef_3
Nef_S2
NewKernel_d
Number_types
OpenNL
Operations_on_polyhedra
Optimal_transportation_reconstruction_2
Optimisation_basic
Partition_2
Periodic_2_triangulation_2
Periodic_3_triangulation_3
Point_set_2
Point_set_processing_3
Point_set_shape_detection_3
Poisson_surface_reconstruction_3
Polygon
Polygon_mesh_processing
Polyhedron
Polyhedron_IO
Polyline_simplification_2
Polynomial
Polytope_distance_d
Principal_component_analysis
Profiling_tools
Property_map
QP_solver
Random_numbers
Ridges_3
STL_Extension
Scale_space_reconstruction_3
Scripts
SearchStructures
Segment_Delaunay_graph_2
Segment_Delaunay_graph_Linf_2
Skin_surface_3
Snap_rounding_2
Solver_interface
Spatial_searching
Spatial_sorting
Straight_skeleton_2
Stream_lines_2
Stream_support
Subdivision_method_3
Surface_mesh
Surface_mesh_deformation
Surface_mesh_parameterization
Surface_mesh_segmentation
Surface_mesh_shortest_path
Surface_mesh_simplification
Surface_mesh_skeletonization
Surface_mesher
Sweep_line_2
TDS_2
TDS_3
Testsuite
Three
Triangulation
Triangulation_2
Triangulation_3
Union_find
Visibility_2
Voronoi_diagram_2
wininst
.gitattributes -rw-r--r-- 2.9 KB
.gitignore -rw-r--r-- 57.2 KB
CMakeLists.txt -rw-r--r-- 677 bytes
INSTALL.md -rw-r--r-- 2.7 KB
LICENSE.md -rw-r--r-- 935 bytes
README.md -rw-r--r-- 2.0 KB
copyright -rw-r--r-- 5.5 KB

README.md

back to top