https://github.com/CGAL/cgal
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
Raw File
Tip revision: 3e4fcd8d900cb4ad5da466878edf9a0b59993c0a authored by Laurent Rineau on 13 July 2016, 14:30:07 UTC
Fix compilation error with gmpxx
Tip revision: 3e4fcd8
.gitattributes
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto

# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.cpp text
*.c text
*.h text
*.hpp text
*.tex text
*.txt text
*.cin text
*.xpm text
*.cmd text
*.lua text
*.py text
*.xml text
*.js text
*.hmtl text
*.bib text
*.sh text
*.css text
*.ui text
*.qrc text
*.off text
*.inc text
*.nef text
*.nef3 text
*.xyz text
*.qhcp text
*.qhp text
*.pwn text
*.poly text
*.rb text
*.perl text
*.pdb text

# Declare files that will always have LF line endings on checkout.
Documentation/Doxyfile text eol=lf
Documentation/pkglist_filter text eol=lf
Installation/update_CHANGES text eol=lf
Scripts/developer_scripts/autotest_cgal text eol=lf
Scripts/developer_scripts/autotest_cgal_with_cmake text eol=lf
Scripts/developer_scripts/cgal_build text eol=lf
Scripts/developer_scripts/cgal_depend text eol=lf
Scripts/developer_scripts/cgal_git_update_hooks_for_client text eol=lf
Scripts/developer_scripts/cgal_test_with_cmake text eol=lf
Scripts/developer_scripts/cgal2gml text eol=lf
Scripts/developer_scripts/check_library_uses_no_gpl_files text eol=lf
Scripts/developer_scripts/check_licenses text eol=lf
Scripts/developer_scripts/check_macro_names text eol=lf
Scripts/developer_scripts/check_no_CGAL_USE_without_includes_before text eol=lf
Scripts/developer_scripts/check_svn_keywords text eol=lf
Scripts/developer_scripts/create_cgal_test text eol=lf
Scripts/developer_scripts/create_cgal_test_with_cmake text eol=lf
Scripts/developer_scripts/create_internal_release text eol=lf
Scripts/developer_scripts/create_macosx_installer text eol=lf
Scripts/developer_scripts/create_new_release text eol=lf
Scripts/developer_scripts/detect_files_with_mixed_eol_styles text eol=lf
Scripts/developer_scripts/detect_packages_licenses text eol=lf
Scripts/developer_scripts/licensecheck text eol=lf
Scripts/developer_scripts/list_cgal_includes text eol=lf
Scripts/developer_scripts/test_license_check text eol=lf
Scripts/developer_scripts/test_testsuite_submission text eol=lf
Scripts/developer_scripts/update_git_svn_clone text eol=lf
Scripts/developer_scripts/clean_up_branch.sh text eol=lf
Scripts/developer_scripts/create_demos_zip_files.sh text eol=lf
Scripts/scripts/cgal_create_cmake_script text eol=lf
Scripts/scripts/cgal_create_CMakeLists text eol=lf
Scripts/scripts/cgal_create_assertions.sh text eol=lf

# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf
*.bat text eol=crlf
*.nsh text eol=crlf
*.vcproj  text eol=crlf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.gif binary
*.bmp binary
*.pdf binary
*.jpeg binary
*.doc binary
*.mws binary
*.odp binary
*.ppt binary
*.fig binary
*.svg binary
*.ipe binary
*.rtf binary
*.gz binary
*.pcx binary
*.ips binary
*.suo binary
*.ico binary
*.inr binary
*.zip binary
*.xls binary
back to top