Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Exact to Double Conversion Error

Subject: CGAL users discussion list

List archive

[cgal-discuss] Exact to Double Conversion Error


Chronological Thread 
  • From: Myirci <>
  • To:
  • Subject: [cgal-discuss] Exact to Double Conversion Error
  • Date: Mon, 20 Jul 2020 12:54:54 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:96VP+BR3jLF+UU4Ikcuj/30QWdpsv+yvbD5Q0YIujvd0So/mwa69YhSN2/xhgRfzUJnB7Loc0qyK6v6mBTBLucvJmUtBWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6OPn+FJLMgMSrzeCy/IDYbxlViDanbr5+MRS7oR/eu8QZjoduNqY8wQbVr3VVfOhb2XlmLk+JkRbm4cew8p9j8yBOtP8k6sVNT6b0cbkmQLJBFDgpPHw768PttRnYUAuA/WAcXXkMkhpJGAfK8hf3VYrsvyTgt+p93C6aPdDqTb0xRD+v4btnRAPuhSwaMTMy7WPZhdFqjK9Drx2vpxJxzY3Jbo+LKPVzZbnScc8ASGdbQspdSy5MD4WhZIUPFeoBOuNYopH6qVoOrBu+HxWjBOLywTJPg3/33aw60/49HgHHxwEgENcOv27VrNXxLqsdTee1zKzRwDjFcvhZ1ivz5pLSfRA9vfGDQ6hwcczJxEQvCw/IklqepJL4Mj6J1+kArWuW4vZ+Weygl2IppAJ8rzivyMouiofEiIIYxF7K+Ch2wIs4Jt61RUx1bNK6DpddsTyROYhuQs46XW1kpCI3xqcFtJO7ZiQG1Yoryh3FZ/GIboSF5A/oWvyLLjdinn1lfaqyhxas/kikze3xTsy030xLripBi9XNuHUN2wHK5siJRfZx412t2TmI1wDU5eFEJV47mbDHJJ4mx748jpsTsULdES/qgEj6krOae0E+9uWr6+nreKjqqoGfOoNuhQzyL7wimsmlDuQ5NggOUXKb+eO51LD7+E34QLRKjucqnanYq53aKsEbqbS4Aw9RyIos9xG/DzK+3NQCgXYHNE5FeA6Aj4XxJ17OL+r3DfOmj1uxkTdr3OzJPqD6ApXWNXXDi7fgfbNl60FG0gYzzNZf54hVCr4bOv7zVFXx55TkCUoyPAWwhurmE95gzZg2WGSVA6bfPrmBn0WP47cKMuiWb45d7DPsKuIu5tbhiHY4nRkWeqz/jshfU2yxAvkzexbRWnHrmNpUST5X7Dp7d/TjjRi5aRAWZ3u2WPhhtDQyCYbjEoKaA47x2fqO2yC0GpAQbWdDWAjVTSXYMr6cUvJJUxq8Z9d7m2VdB7ekQo4lkxqpsV2ikus1Hq/v4iQd8Knb+p1w7uzXmws18GUtXcuY2mCJCWpzmzFRSg==

Hi all,

I had been using CGAL actively for about 4 years ago and I have a project which I wanted to rebuild with the more recent version of CGAL 5.1 beta1. I have sorted out most of the compile errors but one simple thing caused lots of trouble which was working perfectly in the past but I cannot make it work right now. The error is related to a basic conversion from exact numbers such as CGAL::Gmpq, CGAL::Gmpz to double using the CGAL API such as CGAL::to_double() and CGAL::to_interval().

I wrote down a sample code (based on the example in the CGAL documentation for Algebraic Kernels), the corresponding CMakeLists.txt and the compilation error log. Since this is a very simple code, 99% I am sure it is related to my set-up possibly with the GMP library. I am using Ubuntu 20.04 LTS and I both tried installing CGAL via package manager (CGAL 5.0.1) as well as from the source code (CGAL 5.1 beta1 - with/without GMP) but I got the same errors.

Could you help me identify the issue?

Regards,
Murat

test.cpp:
---------------------------------------------------------------------------------------------------------------

#include <CGAL/config.h>
#include <CGAL/Algebraic_kernel_d_1.h>
#include <CGAL/Gmpz.h>
#include <vector>

typedef CGAL::Algebraic_kernel_d_1<CGAL::Gmpz>          AK;
typedef AK::Coefficient                                 Coefficient;
typedef AK::Polynomial_1                                Polynomial_1;
typedef AK::Algebraic_real_1                            Algebraic_real_1;
typedef AK::Bound                                       Bound;
typedef std::pair<Bound,Bound>                          Interval;

int main()
{
    AK ak;
    AK::Construct_algebraic_real_1 construct_algebraic_real_1 = ak.construct_algebraic_real_1_object();
    Polynomial_1 x = CGAL::shift(AK::Polynomial_1(1),1); // the monomial x
    Algebraic_real_1 a = construct_algebraic_real_1(x*x-2,1); //  sqrt(2)

    std::cout << "sign of a is                 : " << CGAL::sign(a)      << "\n";
    std::cout << "double approximation of a is : " << CGAL::to_double(a) << "\n";
    std::cout << "double lower bound of a      : " << CGAL::to_interval(a).first  << "\n";
    std::cout << "double upper bound of a      : " << CGAL::to_interval(a).second << "\n";

    return 0;
}

CMakeLists.txt:
----------------------------------------------------------------------------------------------------------------
cmake_minimum_required(VERSION 3.0)
project(Test)
add_definitions(-std=c++14)
find_package(CGAL QUIET COMPONENTS Core )
if (CGAL_FOUND)
include(${CGAL_USE_FILE})
add_executable(test test.cpp)
target_link_libraries(test ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
else()
message(STATUS "This program requires the CGAL library, and will not be compiled.")
endif()

error log:
--------------------------------------------------------------------------------------------------------------
[ 50%] Building CXX object CMakeFiles/test.dir/test.cpp.o
In file included from /usr/local/include/CGAL/Algebraic_kernel_d_1.h:31,
                 from /home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:2:
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h: In instantiation of ‘std::pair<double, double> CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1>::to_interval() const [with Coefficient_ = CGAL::Gmpz; Rational_ = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; AlgebraicRealRep_d_1 = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>]’:
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:424:28:   required from ‘std::pair<double, double> CGAL::Real_embeddable_traits<CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1> >::To_interval::operator()(const Type&) const [with Coefficient = CGAL::Gmpz; Rational = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; RepClass = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>; CGAL::Real_embeddable_traits<CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1> >::Type = CGAL::internal::Algebraic_real_d_1<CGAL::Gmpz, CGAL::Gmpq, CGAL::Handle_policy_no_union, CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq> >]’
/usr/local/include/CGAL/number_utils.h:301:23:   required from ‘typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type CGAL::to_interval(const Real_embeddable&) [with Real_embeddable = CGAL::internal::Algebraic_real_d_1<CGAL::Gmpz, CGAL::Gmpq, CGAL::Handle_policy_no_union, CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq> >; typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type = std::pair<double, double>]’
/home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:22:74:   required from here
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:176:61: error: conversion from ‘CGAL::Null_functor::result_type’ {aka ‘CGAL::Null_tag’} to non-scalar type ‘std::pair<double, double>’ requested
  176 |       std::pair<double, double> interval = CGAL::to_interval( convert_to_bfi( (*this)));
      |                                            ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/CGAL/CORE_BigFloat.h:22,
                 from /usr/local/include/CGAL/CORE_arithmetic_kernel.h:31,
                 from /usr/local/include/CGAL/Arithmetic_kernel.h:43,
                 from /usr/local/include/CGAL/Algebraic_kernel_d_1.h:30,
                 from /home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:2:
/usr/local/include/CGAL/Bigfloat_interval_traits.h: In instantiation of ‘long int CGAL::get_precision(BFI) [with BFI = CGAL::Null_tag]’:
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:174:41:   required from ‘std::pair<double, double> CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1>::to_interval() const [with Coefficient_ = CGAL::Gmpz; Rational_ = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; AlgebraicRealRep_d_1 = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>]’
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:424:28:   required from ‘std::pair<double, double> CGAL::Real_embeddable_traits<CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1> >::To_interval::operator()(const Type&) const [with Coefficient = CGAL::Gmpz; Rational = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; RepClass = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>; CGAL::Real_embeddable_traits<CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1> >::Type = CGAL::internal::Algebraic_real_d_1<CGAL::Gmpz, CGAL::Gmpq, CGAL::Handle_policy_no_union, CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq> >]’
/usr/local/include/CGAL/number_utils.h:301:23:   required from ‘typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type CGAL::to_interval(const Real_embeddable&) [with Real_embeddable = CGAL::internal::Algebraic_real_d_1<CGAL::Gmpz, CGAL::Gmpq, CGAL::Handle_policy_no_union, CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq> >; typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type = std::pair<double, double>]’
/home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:22:74:   required from here
/usr/local/include/CGAL/Bigfloat_interval_traits.h:39:59: error: invalid use of incomplete type ‘class CGAL::Bigfloat_interval_traits<CGAL::Null_tag>’
   39 |     typename Bigfloat_interval_traits<BFI>::Get_precision get_precision;
      |                                                           ^~~~~~~~~~~~~
/usr/local/include/CGAL/Bigfloat_interval_traits.h:26:43: note: declaration of ‘class CGAL::Bigfloat_interval_traits<CGAL::Null_tag>’
   26 | template<typename BigfloatInterval> class Bigfloat_interval_traits;
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/CGAL/Bigfloat_interval_traits.h: In instantiation of ‘long int CGAL::set_precision(BFI, long int) [with BFI = CGAL::Null_tag]’:
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:175:20:   required from ‘std::pair<double, double> CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1>::to_interval() const [with Coefficient_ = CGAL::Gmpz; Rational_ = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; AlgebraicRealRep_d_1 = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>]’
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:424:28:   required from ‘std::pair<double, double> CGAL::Real_embeddable_traits<CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1> >::To_interval::operator()(const Type&) const [with Coefficient = CGAL::Gmpz; Rational = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; RepClass = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>; CGAL::Real_embeddable_traits<CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1> >::Type = CGAL::internal::Algebraic_real_d_1<CGAL::Gmpz, CGAL::Gmpq, CGAL::Handle_policy_no_union, CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq> >]’
/usr/local/include/CGAL/number_utils.h:301:23:   required from ‘typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type CGAL::to_interval(const Real_embeddable&) [with Real_embeddable = CGAL::internal::Algebraic_real_d_1<CGAL::Gmpz, CGAL::Gmpq, CGAL::Handle_policy_no_union, CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq> >; typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type = std::pair<double, double>]’
/home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:22:74:   required from here
/usr/local/include/CGAL/Bigfloat_interval_traits.h:34:59: error: invalid use of incomplete type ‘class CGAL::Bigfloat_interval_traits<CGAL::Null_tag>’
   34 |     typename Bigfloat_interval_traits<BFI>::Set_precision set_precision;
      |                                                           ^~~~~~~~~~~~~
/usr/local/include/CGAL/Bigfloat_interval_traits.h:26:43: note: declaration of ‘class CGAL::Bigfloat_interval_traits<CGAL::Null_tag>’
   26 | template<typename BigfloatInterval> class Bigfloat_interval_traits;
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/CGAL/Algebraic_kernel_d_1.h:31,
                 from /home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:2:
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h: In instantiation of ‘typename CGAL::Get_arithmetic_kernel<NT>::Arithmetic_kernel::Bigfloat_interval CGAL::convert_to_bfi(const CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1>&) [with Coefficient_ = CGAL::Gmpz; Rational_ = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; AlgebraicRealRep_d_1 = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>; typename CGAL::Get_arithmetic_kernel<NT>::Arithmetic_kernel::Bigfloat_interval = CGAL::Null_tag]’:
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:176:77:   required from ‘std::pair<double, double> CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1>::to_interval() const [with Coefficient_ = CGAL::Gmpz; Rational_ = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; AlgebraicRealRep_d_1 = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>]’
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:424:28:   required from ‘std::pair<double, double> CGAL::Real_embeddable_traits<CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1> >::To_interval::operator()(const Type&) const [with Coefficient = CGAL::Gmpz; Rational = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; RepClass = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>; CGAL::Real_embeddable_traits<CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1> >::Type = CGAL::internal::Algebraic_real_d_1<CGAL::Gmpz, CGAL::Gmpq, CGAL::Handle_policy_no_union, CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq> >]’
/usr/local/include/CGAL/number_utils.h:301:23:   required from ‘typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type CGAL::to_interval(const Real_embeddable&) [with Real_embeddable = CGAL::internal::Algebraic_real_d_1<CGAL::Gmpz, CGAL::Gmpq, CGAL::Handle_policy_no_union, CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq> >; typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type = std::pair<double, double>]’
/home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:22:74:   required from here
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:479:43: error: no matching function for call to ‘CGAL::Null_tag::Null_tag(int)’
  479 |   if(CGAL::sign(x) == CGAL::ZERO) return (BFI(0));
      |                                          ~^~~~~~~
In file included from /usr/local/include/CGAL/basic.h:32,
                 from /usr/local/include/CGAL/Algebraic_kernel_d_1.h:26,
                 from /home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:2:
/usr/local/include/CGAL/tags.h:50:8: note: candidate: ‘constexpr CGAL::Null_tag::Null_tag()’
   50 | struct Null_tag {};
      |        ^~~~~~~~
/usr/local/include/CGAL/tags.h:50:8: note:   candidate expects 0 arguments, 1 provided
/usr/local/include/CGAL/tags.h:50:8: note: candidate: ‘constexpr CGAL::Null_tag::Null_tag(const CGAL::Null_tag&)’
/usr/local/include/CGAL/tags.h:50:8: note:   no known conversion for argument 1 from ‘int’ to ‘const CGAL::Null_tag&’
/usr/local/include/CGAL/tags.h:50:8: note: candidate: ‘constexpr CGAL::Null_tag::Null_tag(CGAL::Null_tag&&)’
/usr/local/include/CGAL/tags.h:50:8: note:   no known conversion for argument 1 from ‘int’ to ‘CGAL::Null_tag&&’
In file included from /usr/local/include/CGAL/Algebraic_kernel_d_1.h:31,
                 from /home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:2:
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:484:23: error: no matching function for call to ‘hull(CGAL::internal::Arithmetic_kernel_base::Bigfloat_interval, CGAL::internal::Arithmetic_kernel_base::Bigfloat_interval)’
  484 |   BFI bfi = CGAL::hull(convert_to_bfi(x.low()), convert_to_bfi(x.high()));
      |             ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/CGAL/Interval_nt.h:41,
                 from /usr/local/include/CGAL/long_double.h:27,
                 from /usr/local/include/CGAL/number_type_basic.h:52,
                 from /usr/local/include/CGAL/basic.h:33,
                 from /usr/local/include/CGAL/Algebraic_kernel_d_1.h:26,
                 from /home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:2:
/usr/local/include/CGAL/Interval_traits.h:205:1: note: candidate: ‘template<class Interval> typename CGAL::Interval_traits<T>::Hull::result_type CGAL::hull(Interval, Interval, typename boost::enable_if<boost::is_same<typename CGAL::Interval_traits<Interval>::Is_interval, CGAL::Boolean_tag<true> > >::type*)’
  205 | hull(Interval interval1, Interval interval2, typename boost::enable_if<
      | ^~~~
/usr/local/include/CGAL/Interval_traits.h:205:1: note:   template argument deduction/substitution failed:
/usr/local/include/CGAL/Interval_traits.h: In substitution of ‘template<class Interval> typename CGAL::Interval_traits<T>::Hull::result_type CGAL::hull(Interval, Interval, typename boost::enable_if<boost::is_same<typename CGAL::Interval_traits<Interval>::Is_interval, CGAL::Boolean_tag<true> > >::type*) [with Interval = CGAL::Null_tag]’:
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:484:23:   required from ‘typename CGAL::Get_arithmetic_kernel<NT>::Arithmetic_kernel::Bigfloat_interval CGAL::convert_to_bfi(const CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1>&) [with Coefficient_ = CGAL::Gmpz; Rational_ = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; AlgebraicRealRep_d_1 = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>; typename CGAL::Get_arithmetic_kernel<NT>::Arithmetic_kernel::Bigfloat_interval = CGAL::Null_tag]’
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:176:77:   required from ‘std::pair<double, double> CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1>::to_interval() const [with Coefficient_ = CGAL::Gmpz; Rational_ = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; AlgebraicRealRep_d_1 = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>]’
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:424:28:   required from ‘std::pair<double, double> CGAL::Real_embeddable_traits<CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1> >::To_interval::operator()(const Type&) const [with Coefficient = CGAL::Gmpz; Rational = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; RepClass = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>; CGAL::Real_embeddable_traits<CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1> >::Type = CGAL::internal::Algebraic_real_d_1<CGAL::Gmpz, CGAL::Gmpq, CGAL::Handle_policy_no_union, CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq> >]’
/usr/local/include/CGAL/number_utils.h:301:23:   required from ‘typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type CGAL::to_interval(const Real_embeddable&) [with Real_embeddable = CGAL::internal::Algebraic_real_d_1<CGAL::Gmpz, CGAL::Gmpq, CGAL::Handle_policy_no_union, CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq> >; typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type = std::pair<double, double>]’
/home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:22:74:   required from here
/usr/local/include/CGAL/Interval_traits.h:205:1: error: no type named ‘type’ in ‘struct boost::enable_if<boost::is_same<CGAL::Boolean_tag<false>, CGAL::Boolean_tag<true> >, void>’
In file included from /usr/local/include/CGAL/Algebraic_kernel_d_1.h:31,
                 from /home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:2:
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h: In instantiation of ‘typename CGAL::Get_arithmetic_kernel<NT>::Arithmetic_kernel::Bigfloat_interval CGAL::convert_to_bfi(const CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1>&) [with Coefficient_ = CGAL::Gmpz; Rational_ = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; AlgebraicRealRep_d_1 = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>; typename CGAL::Get_arithmetic_kernel<NT>::Arithmetic_kernel::Bigfloat_interval = CGAL::Null_tag]’:
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:176:77:   required from ‘std::pair<double, double> CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1>::to_interval() const [with Coefficient_ = CGAL::Gmpz; Rational_ = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; AlgebraicRealRep_d_1 = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>]’
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:424:28:   required from ‘std::pair<double, double> CGAL::Real_embeddable_traits<CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1> >::To_interval::operator()(const Type&) const [with Coefficient = CGAL::Gmpz; Rational = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; RepClass = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>; CGAL::Real_embeddable_traits<CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1> >::Type = CGAL::internal::Algebraic_real_d_1<CGAL::Gmpz, CGAL::Gmpq, CGAL::Handle_policy_no_union, CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq> >]’
/usr/local/include/CGAL/number_utils.h:301:23:   required from ‘typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type CGAL::to_interval(const Real_embeddable&) [with Real_embeddable = CGAL::internal::Algebraic_real_d_1<CGAL::Gmpz, CGAL::Gmpq, CGAL::Handle_policy_no_union, CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq> >; typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type = std::pair<double, double>]’
/home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:22:74:   required from here
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:486:10: error: no match for ‘operator!’ (operand type is ‘CGAL::Null_functor::result_type’ {aka ‘CGAL::Null_tag’})
  486 |   while( !singleton(bfi) &&  get_significant_bits(bfi) < final_prec  ){
      |          ^~~~~~~~~~~~~~~
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:486:10: note: candidate: ‘operator!(bool)’ <built-in>
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:486:10: note:   no known conversion for argument 1 from ‘CGAL::Null_functor::result_type’ {aka ‘CGAL::Null_tag’} to ‘bool’
In file included from /usr/local/include/CGAL/assertions.h:350,
                 from /usr/local/include/CGAL/basic.h:31,
                 from /usr/local/include/CGAL/Algebraic_kernel_d_1.h:26,
                 from /home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:2:
/usr/local/include/CGAL/Uncertain.h:289:17: note: candidate: ‘CGAL::Uncertain<bool> CGAL::operator!(CGAL::Uncertain<bool>)’
  289 | Uncertain<bool> operator!(Uncertain<bool> a)
      |                 ^~~~~~~~
/usr/local/include/CGAL/Uncertain.h:289:43: note:   no known conversion for argument 1 from ‘CGAL::Null_functor::result_type’ {aka ‘CGAL::Null_tag’} to ‘CGAL::Uncertain<bool>’
  289 | Uncertain<bool> operator!(Uncertain<bool> a)
      |                           ~~~~~~~~~~~~~~~~^
In file included from /usr/local/include/CGAL/Algebraic_kernel_d_1.h:31,
                 from /home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:2:
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:488:21: error: no matching function for call to ‘hull(CGAL::internal::Arithmetic_kernel_base::Bigfloat_interval, CGAL::internal::Arithmetic_kernel_base::Bigfloat_interval)’
  488 |     bfi = CGAL::hull(
      |           ~~~~~~~~~~^
  489 |         convert_to_bfi(x.low()),
      |         ~~~~~~~~~~~~~~~~~~~~~~~~
  490 |         convert_to_bfi(x.high()));
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/CGAL/Interval_nt.h:41,
                 from /usr/local/include/CGAL/long_double.h:27,
                 from /usr/local/include/CGAL/number_type_basic.h:52,
                 from /usr/local/include/CGAL/basic.h:33,
                 from /usr/local/include/CGAL/Algebraic_kernel_d_1.h:26,
                 from /home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:2:
/usr/local/include/CGAL/Interval_traits.h:205:1: note: candidate: ‘template<class Interval> typename CGAL::Interval_traits<T>::Hull::result_type CGAL::hull(Interval, Interval, typename boost::enable_if<boost::is_same<typename CGAL::Interval_traits<Interval>::Is_interval, CGAL::Boolean_tag<true> > >::type*)’
  205 | hull(Interval interval1, Interval interval2, typename boost::enable_if<
      | ^~~~
/usr/local/include/CGAL/Interval_traits.h:205:1: note:   template argument deduction/substitution failed:
/usr/local/include/CGAL/Interval_traits.h: In substitution of ‘template<class Interval> typename CGAL::Interval_traits<T>::Hull::result_type CGAL::hull(Interval, Interval, typename boost::enable_if<boost::is_same<typename CGAL::Interval_traits<Interval>::Is_interval, CGAL::Boolean_tag<true> > >::type*) [with Interval = CGAL::Null_tag]’:
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:488:21:   required from ‘typename CGAL::Get_arithmetic_kernel<NT>::Arithmetic_kernel::Bigfloat_interval CGAL::convert_to_bfi(const CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1>&) [with Coefficient_ = CGAL::Gmpz; Rational_ = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; AlgebraicRealRep_d_1 = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>; typename CGAL::Get_arithmetic_kernel<NT>::Arithmetic_kernel::Bigfloat_interval = CGAL::Null_tag]’
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:176:77:   required from ‘std::pair<double, double> CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1>::to_interval() const [with Coefficient_ = CGAL::Gmpz; Rational_ = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; AlgebraicRealRep_d_1 = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>]’
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:424:28:   required from ‘std::pair<double, double> CGAL::Real_embeddable_traits<CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1> >::To_interval::operator()(const Type&) const [with Coefficient = CGAL::Gmpz; Rational = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; RepClass = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>; CGAL::Real_embeddable_traits<CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1> >::Type = CGAL::internal::Algebraic_real_d_1<CGAL::Gmpz, CGAL::Gmpq, CGAL::Handle_policy_no_union, CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq> >]’
/usr/local/include/CGAL/number_utils.h:301:23:   required from ‘typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type CGAL::to_interval(const Real_embeddable&) [with Real_embeddable = CGAL::internal::Algebraic_real_d_1<CGAL::Gmpz, CGAL::Gmpq, CGAL::Handle_policy_no_union, CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq> >; typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type = std::pair<double, double>]’
/home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:22:74:   required from here
/usr/local/include/CGAL/Interval_traits.h:205:1: error: no type named ‘type’ in ‘struct boost::enable_if<boost::is_same<CGAL::Boolean_tag<false>, CGAL::Boolean_tag<true> >, void>’
In file included from /usr/local/include/CGAL/double.h:22,
                 from /usr/local/include/CGAL/number_type_basic.h:51,
                 from /usr/local/include/CGAL/basic.h:33,
                 from /usr/local/include/CGAL/Algebraic_kernel_d_1.h:26,
                 from /home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:2:
/usr/local/include/CGAL/number_utils.h: In instantiation of ‘typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type CGAL::to_interval(const Real_embeddable&) [with Real_embeddable = CGAL::Null_tag; typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type = CGAL::Null_tag]’:
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:176:61:   required from ‘std::pair<double, double> CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1>::to_interval() const [with Coefficient_ = CGAL::Gmpz; Rational_ = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; AlgebraicRealRep_d_1 = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>]’
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:424:28:   required from ‘std::pair<double, double> CGAL::Real_embeddable_traits<CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1> >::To_interval::operator()(const Type&) const [with Coefficient = CGAL::Gmpz; Rational = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; RepClass = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>; CGAL::Real_embeddable_traits<CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1> >::Type = CGAL::internal::Algebraic_real_d_1<CGAL::Gmpz, CGAL::Gmpq, CGAL::Handle_policy_no_union, CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq> >]’
/usr/local/include/CGAL/number_utils.h:301:23:   required from ‘typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type CGAL::to_interval(const Real_embeddable&) [with Real_embeddable = CGAL::internal::Algebraic_real_d_1<CGAL::Gmpz, CGAL::Gmpq, CGAL::Handle_policy_no_union, CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq> >; typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type = std::pair<double, double>]’
/home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:22:74:   required from here
/usr/local/include/CGAL/number_utils.h:301:23: error: no match for call to ‘(CGAL::INTERN_RET::Real_embeddable_traits_base<CGAL::Null_tag, CGAL::Boolean_tag<false> >::To_interval {aka CGAL::Null_functor}) (const CGAL::Null_tag&)’
  301 |     return to_interval( x );
      |            ~~~~~~~~~~~^~~~~
In file included from /usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:27,
                 from /usr/local/include/CGAL/Algebraic_kernel_d_1.h:31,
                 from /home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:2:
/usr/local/include/CGAL/convert_to_bfi.h: In instantiation of ‘typename CGAL::Get_arithmetic_kernel<NT>::Arithmetic_kernel::Bigfloat_interval CGAL::convert_to_bfi(const NTX&) [with NTX = CGAL::Gmpq; typename CGAL::Get_arithmetic_kernel<NT>::Arithmetic_kernel::Bigfloat_interval = CGAL::Null_tag]’:
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:477:45:   required from ‘typename CGAL::Get_arithmetic_kernel<NT>::Arithmetic_kernel::Bigfloat_interval CGAL::convert_to_bfi(const CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1>&) [with Coefficient_ = CGAL::Gmpz; Rational_ = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; AlgebraicRealRep_d_1 = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>; typename CGAL::Get_arithmetic_kernel<NT>::Arithmetic_kernel::Bigfloat_interval = CGAL::Null_tag]’
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:176:77:   required from ‘std::pair<double, double> CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1>::to_interval() const [with Coefficient_ = CGAL::Gmpz; Rational_ = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; AlgebraicRealRep_d_1 = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>]’
/usr/local/include/CGAL/Algebraic_kernel_d/Algebraic_real_d_1.h:424:28:   required from ‘std::pair<double, double> CGAL::Real_embeddable_traits<CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1> >::To_interval::operator()(const Type&) const [with Coefficient = CGAL::Gmpz; Rational = CGAL::Gmpq; HandlePolicy = CGAL::Handle_policy_no_union; RepClass = CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq>; CGAL::Real_embeddable_traits<CGAL::internal::Algebraic_real_d_1<Coefficient_, Rational_, HandlePolicy, AlgebraicRealRep_d_1> >::Type = CGAL::internal::Algebraic_real_d_1<CGAL::Gmpz, CGAL::Gmpq, CGAL::Handle_policy_no_union, CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq> >]’
/usr/local/include/CGAL/number_utils.h:301:23:   required from ‘typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type CGAL::to_interval(const Real_embeddable&) [with Real_embeddable = CGAL::internal::Algebraic_real_d_1<CGAL::Gmpz, CGAL::Gmpq, CGAL::Handle_policy_no_union, CGAL::internal::Algebraic_real_rep<CGAL::Gmpz, CGAL::Gmpq> >; typename CGAL::Real_embeddable_traits<Type_>::To_interval::result_type = std::pair<double, double>]’
/home/myirci/Documents/dev/dev_trial_cpp/CGAL/Algebraic_Kernel/Error/test.cpp:22:74:   required from here
/usr/local/include/CGAL/convert_to_bfi.h:30:31: error: no match for call to ‘(CGAL::Coercion_traits_for_level<CGAL::Gmpq, CGAL::Null_tag, 0>::Cast {aka CGAL::Null_functor}) (const CGAL::Gmpq&)’
   30 |     return typename CT::Cast()(x);
      |            ~~~~~~~~~~~~~~~~~~~^~~
make[2]: *** [CMakeFiles/test.dir/build.make:63: CMakeFiles/test.dir/test.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/test.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
--
Murat Yirci



Archive powered by MHonArc 2.6.19+.

Top of Page