Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Creation of Point_2 (cgal 4.12)
- Date: Thu, 26 Apr 2018 21:18:14 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:85fDChWVjUREWvzlAmCYIjtMGXPV8LGtZVwlr6E/grcLSJyIuqrYbBCOt8tkgFKBZ4jH8fUM07OQ7/i7HzRYqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba98IRmssQndqtQdjJd/JKo21hbHuGZDdf5MxWNvK1KTnhL86dm18ZV+7SleuO8v+tBZX6nicKs2UbJXDDI9M2Ao/8LrrgXMTRGO5nQHTGoblAdDDhXf4xH7WpfxtTb6tvZ41SKHM8D6Uaw4VDK/5KptVRTmijoINyQh/W/KlMJwgqJVrhGvqRNxzIHbYp2aOvVlc6PBft4XX3ZNUtpfWiFDBI63cosBD/AGPeZdt4TxqUYAogWlCga2H+Pv1j5IiWHw3aYn1eohFhvG3A0nH9ISrX/YqNT7O7kVUeCw0qbI0S/DbvNW1zjn9IfIbhchoeuMXL51f8ba1E4iFxjBjlWXs4zlPjSV1vgXv2ie6+ptTu2vi2s9pAFwpjij3Nsjio7Mho8MzF3P6Ct3wIEwJdKiSU57Z8apH4dfty6AM4t6WMQiQ3tnuCs817YIuoa7cTAUxJg7wxPTcf+KfoiS7h7+SuqcIi10iG9ndb+7nxq/80utxvfiWsS70VtGtDdJn93Cu3wX1RHe6s6KQeZn8Ei7wzaAzQXT5/lEIU8qkarbLIYswrsqmZoStUTPByH3mF/qgKOPeEUo5+ql5uD9brXpoZ+cMIB0igXgPag0hsO/BuE4PhAPX2id5+u8yKXu8VPlTLhOlPE7kanUvIrHKcgFpaO1GRJZ34Qn5hqnCjepytUYnX0JLFJffxKHipDkO0rKIPD/F/e/glOskCtxy/DDOr3sGZrNLn3Zn7fgebZx8VJTyA02zdxH/ZJbFqkBIO7vWk/2rNHXEhA5PBaww+r+Fdp915geVn6SAq+CK6PfqkSI5+IqI+mUfoAZojf9K/4/5/7vl3A1g1EdfbP6lacQPXu3F/AjL0SCamf3mf8AF30Lt0wwVr/EklqHBHRoany7RL496zdzLIW8DIDfDsCCjbuE0TuhD7NfbXxBEEHNWz+8bIGDQfYLdGSXJudulzUFUf6qTIp3hkLmjxPz17cydrmcwSYfr5+2jIEktd2Wrgk78HlPN+rY1miMS29umWZRHm052al+pQp2zVLRiPEk0cwdLsRa4rZyail/LYTVlrUoBNX7WwaHddCMGg7/H4eWRAopR9d0+OcgJkZwH9L40ELG1iuuRqAPz/mFXcNltK3b2Hf1KoB2zHOUjKQ=
Try ld(Point(Kernel::FT(crd.x), Kernel::FT(crd.y)))
Sebastien.
On 04/26/2018 05:03 PM, Dinesh Shetty wrote:
I have declared following
#include<CGAL/Exact_predicates_exact_constructions_kernel.h>
typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
typedef Kernel::Point_2 Point;
The fololling line seems to cause problem
auto status =ld(Point(crd.x, crd.y));
crd.x and crd.y are of type CGAL::Gmpq
I thought this would trigger following constructor
Point_2 <https://doc.cgal.org/latest/Kernel_23/classCGAL_1_1Point__2.html#ae86ad08ceefb6b2d9aac560c7ddc34ef>(constKernel::FT <https://doc.cgal.org/latest/Kernel_23/classKernel.html#a55e83f5a9f8ca43588b02ae8256a8fbd>&x <https://doc.cgal.org/latest/Kernel_23/classCGAL_1_1Point__2.html#a2d77e6a2b4ae36169e0cf4e2e9c35378>, constKernel::FT <https://doc.cgal.org/latest/Kernel_23/classKernel.html#a55e83f5a9f8ca43588b02ae8256a8fbd>&y <https://doc.cgal.org/latest/Kernel_23/classCGAL_1_1Point__2.html#ac844c95dbfc2e70e82dc6ee1095871f4>)
The compiler error is listed below
3>D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Lazy.h(1743): error C2665: 'CGAL::exact' : none of the 15 overloads could convert all the argument types
3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Lazy.h(105): could be 'const long double &CGAL::exact(const long double &)'
3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Lazy.h(106): or 'const double &CGAL::exact(const double &)'
3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Lazy.h(107): or 'const float &CGAL::exact(const float &)'
3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Lazy.h(108): or 'const int &CGAL::exact(const int &)'
3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Lazy.h(109): or 'const unsigned int &CGAL::exact(const unsigned int &)'
3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Lazy.h(110): or 'const long &CGAL::exact(const long &)'
3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Lazy.h(111): or 'const unsigned long &CGAL::exact(const unsigned long &)'
3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Lazy.h(113): or 'const __int64 &CGAL::exact(const __int64 &)'
3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Lazy.h(114): or 'const unsigned __int64 &CGAL::exact(const unsigned __int64 &)'
3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Lazy.h(116): or 'const CGAL::Return_base_tag &CGAL::exact(const CGAL::Return_base_tag &)'
3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Lazy.h(117): or 'const CGAL::Null_vector &CGAL::exact(const CGAL::Null_vector &)'
3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Lazy.h(118): or 'const CGAL::Origin &CGAL::exact(const CGAL::Origin &)'
3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Lazy.h(119): or 'const CGAL::Orientation &CGAL::exact(const CGAL::Orientation &)'
3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Lazy.h(120): or 'const CGAL::Bbox_2 &CGAL::exact(const CGAL::Bbox_2 &)'
3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Lazy.h(121): or 'const CGAL::Bbox_3 &CGAL::exact(const CGAL::Bbox_3 &)'
3> while trying to match the argument list '(const CGAL::Gmpq)'
3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Point_2.h(88) : see reference to function template instantiation 'CGAL::Point_2<R_> CGAL::Lazy_construction<LK,AC,EC>::operator ()<CGAL::Return_base_tag,T1,T2>(const L0 &,const L1 &,const L2 &) const' being compiled
3> with
3> [
3> R_=CGAL::Epeck,
3> LK=CGAL::Epeck,
3> AC=CGAL::CartesianKernelFunctors::Construct_point_2<CGAL::Simple_cartesian<CGAL::Interval_nt_advanced>>,
3> EC=CGAL::CartesianKernelFunctors::Construct_point_2<CGAL::Simple_cartesian<CGAL::Gmpq>>,
3> T1=CGAL::Gmpq,
3> T2=CGAL::Gmpq,
3> L0=CGAL::Return_base_tag,
3> L1=CGAL::Gmpq,
3> L2=CGAL::Gmpq
3> ]
3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Point_2.h(90) : see reference to function template instantiation 'CGAL::Point_2<R_> CGAL::Lazy_construction<LK,AC,EC>::operator ()<CGAL::Return_base_tag,T1,T2>(const L0 &,const L1 &,const L2 &) const' being compiled
3> with
3> [
3> R_=CGAL::Epeck,
3> LK=CGAL::Epeck,
3> AC=CGAL::CartesianKernelFunctors::Construct_point_2<CGAL::Simple_cartesian<CGAL::Interval_nt_advanced>>,
3> EC=CGAL::CartesianKernelFunctors::Construct_point_2<CGAL::Simple_cartesian<CGAL::Gmpq>>,
3> T1=CGAL::Gmpq,
3> T2=CGAL::Gmpq,
3> L0=CGAL::Return_base_tag,
3> L1=CGAL::Gmpq,
3> L2=CGAL::Gmpq
3> ]
3> src\DdmMesh.cpp(196) : see reference to function template instantiation 'CGAL::Point_2<R_>::Point_2<CGAL::Gmpq,CGAL::Gmpq>(const T1 &,const T2 &)' being compiled
3> with
3> [
3> R_=CGAL::Epeck,
3> T1=CGAL::Gmpq,
3> T2=CGAL::Gmpq
3> ]
if I convert from CGAl::gmpq to double it works.
Regards
Dinesh
- [cgal-discuss] Creation of Point_2 (cgal 4.12), Dinesh Shetty, 04/26/2018
- Re: [cgal-discuss] Creation of Point_2 (cgal 4.12), Sebastien Loriot (GeometryFactory), 04/26/2018
Archive powered by MHonArc 2.6.18.