Subject: CGAL users discussion list
List archive
- From: Andrew Cunningham <>
- To:
- Subject: Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1
- Date: Tue, 8 Sep 2020 15:08:23 -0700
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=None
- Ironport-phdr: 9a23:LyvC0xI65iInFfrjdtmcpTZWNBhigK39O0sv0rFitYgeKf/xwZ3uMQTl6Ol3ixeRBMOHsqwC0rCK+PC5EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCe8bL9oMRm6swrcusYVjId/N6081gbHrnxUdupM2GhmP0iTnxHy5sex+J5s7SFdsO8/+sBDTKv3Yb02QaRXAzo6PW814tbrtQTYQguU+nQcSGQWnQFWDAXD8Rr3Q43+sir+tup6xSmaIcj7Rq06VDi+86tmTgLjhSEaPDA77W7XkNR9g61VoB2jpxJxzY3abpyLOvViZa7SZ88WSHBbU8pNSyBMAIWxZJYPAeobOuZYqpHwqkcIrRSjHwmjGu3uwSJWi3/r26061eUhEQfJ3AwgBd0OtWnfodLpO6cdS++1yLLFwi/aY/xKxDf97o7IchEnofGDXbJ/a8/RxVMzGAPCi1WdsIroNC6a2eoRqWaU9fZgVf6xhG49rQF8ujqiy8cjh4THho8bxVTJ+CV4zYs7ONG1RkB1bNGlHZdMtCyXN497T90iTWx1uis0xbkLtJqmcSUKxpoqxh7SZuGBfoOV4RzjTP6cLSlkiH9hYr6yhBa//VK9xuD9VMS4yktGoyhBn9TKq3sDzQbc6tKdRft45kqh2SiA1wTU6uxcJEA7j6vbK5o4zr43l5ofrF3PHiHrlEj0iKKabEok+u+v6+ToZrXpuIWQOJNzigH7Kqgum8q/DvokMgUWQWSX5eCx2Kfg8ED5WrlGk/w7n6vDvJzHJ8kWora1AwpP3YYi7xa/AS2m0NMdnXQfNl1KZReHj4nvO1zVOv/0FOuwg0mqkDdtxvDGOLLhApXXIXjGirvuYbF960tExAop0d9f/45UCq0GIP/rRkDxu8bXDhsgPwOpwubnE8ly1p4FWWKUGaKZK6PTsVqQ5u01OeWMZYkVuCz8K/c//fLug2U5yhchevyi0pITLXy5Bf97OF6xYHz2g95HH31ZkBA5SbnDjlGYXCEbTGu0WaM66TEyDcryBojKQqikxbec2iG6GJJWb2UAAVeJRyS7P76YUusBPXrBavRqlSYJAOD4F90RkCq2vQq/8IJJa/LO83RI55um38Vz4ezVmhE78Hp/CMHPizjQHVExpXsBQnoN5I46oUF5zQ3dg61xgvgdEt0Kov0QDVZ8OpnbwOh3Tdv1X1CZJ4bbeBOdWtyjRAoJYJc0yt4KbVx6Hozy3BmG1DesBb4TmLyCAdo/9aeOh3U=
And just to round out one more compiler issue with ICC 19.1 I had to modify FPU.h as there is no
__builtin_sqrt on Windows with ICC 19.1
// For SSE2, we need to call __builtin_sqrt() instead of libc's sqrt().
#if defined ( _MSC_VER ) && defined ( __INTEL_COMPILER )
# define CGAL_BUG_SQRT(d) std::sqrt(d)
#else
# define CGAL_BUG_SQRT(d) __builtin_sqrt(d)
#endif
#if defined ( _MSC_VER ) && defined ( __INTEL_COMPILER )
# define CGAL_BUG_SQRT(d) std::sqrt(d)
#else
# define CGAL_BUG_SQRT(d) __builtin_sqrt(d)
#endif
On Tue, Sep 8, 2020 at 2:39 PM Andrew Cunningham <> wrote:
I have found the cause of the CGAL 5.1 compilation error with the Intel Compiler 19.1 and C++17.This snippet of code is new to CGAL 5.1 and is used in a series of headers such as Point_3.h__cpp_lib_is_swappable is #defined when C++17 is defined as the language standard.friend void swap(Self& a, Self& b)
#ifdef __cpp_lib_is_swappable
noexcept(std::is_nothrow_swappable_v<Rep>)
#endifINMHO, this code is using an obscure and advanced C++17 (C++20?) feature for no real gain. I would suggest reverting this change.On Tue, Sep 8, 2020 at 1:23 PM Andrew Cunningham <> wrote:This ussue only seems to happen with /std:c++17. If I change the language conformance to /std:c++14 the code compiles with ICC 19.1On Tue, Sep 8, 2020 at 12:34 PM Andrew Cunningham <> wrote:etc more like this.Hi,Code that compiles without error when using GCAL 5.0.3 now fails with 5.1 with Visual Studio 2019+Intel Compiler 19.1.Code compiles without error when using the native Microsoft compiler.Since the same code compiled with 5.0.3 when using ICC 19.1, maybe whatever changed from 5.0.3-5.1 is the key.Sample code#include <CGAL/Simple_cartesian.h>
#include <CGAL/Surface_mesh.h>
using Point_3 = CGAL::Simple_cartesian< float >::Point_3;
using Mesh = CGAL::Surface_mesh< Point_3 >;
using vertex_descriptor = Mesh::Vertex_index;
using face_descriptor = Mesh::Face_index;Andrew1>D:\CGAL-5.1\include\CGAL/Cartesian/Line_3.h(38): error : incomplete type is not allowed1> Point_3 first;
1> ^
1> detected during:
1> instantiation of class "CGAL::LineC3<R_>::Rep [with R_=CGAL::Simple_cartesian<float>]" at line 46
1> instantiation of class "CGAL::LineC3<R_> [with R_=CGAL::Simple_cartesian<float>]" at line 30 of "D:\CGAL-5.1\include\CGAL/Line_3.h"
1> instantiation of class "CGAL::Line_3<R_> [with R_=CGAL::Simple_cartesian<float>]" at line 678 of "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\type_traits"
1> instantiation of "const bool std::is_move_constructible_v [with _Ty=CGAL::VectorC3<CGAL::Simple_cartesian<float>>]" at line 61 of "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\type_traits"
1> instantiation of class "std::conjunction<_First, _Rest...> [with _First=std::_Swappable_with_helper<std::add_lvalue_reference_t<CGAL::VectorC3<CGAL::Simple_cartesian<float>>>, std::add_lvalue_reference_t<CGAL::VectorC3<CGAL::Simple_cartesian<float>>>, void>, _Rest=<std::_Swappable_with_helper<std::add_lvalue_reference_t<CGAL::VectorC3<CGAL::Simple_cartesian<float>>>, std::add_lvalue_reference_t<CGAL::VectorC3<CGAL::Simple_cartesian<float>>>, void>>]" at line 66 of "C:\Program Files
1> (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\include\type_traits"
1> [ 9 instantiation contexts not shown ]
1> instantiation of class "CGAL::Point_3<R_> [with R_=CGAL::Simple_cartesian<float>]" at line 213 of "D:\CGAL-5.1\include\CGAL/Surface_mesh/Properties.h"
1> instantiation of class "CGAL::Properties::Property_array<T> [with T=Point_3]" at line 515 of "D:\CGAL-5.1\include\CGAL/Surface_mesh/Properties.h"
1> instantiation of class "CGAL::Properties::Property_map_base<I, T, CRTP_derived_class> [with I=CGAL::SM_Vertex_index, T=Point_3, CRTP_derived_class=CGAL::Surface_mesh<Point_3>::Property_map<CGAL::SM_Vertex_index, Point_3>]" at line 342 of "D:\CGAL-5.1\include\CGAL/Surface_mesh/Surface_mesh.h"
1> instantiation of class "CGAL::Surface_mesh<P>::Property_map<I, T> [with P=Point_3, I=CGAL::SM_Vertex_index, T=Point_3]" at line 2098 of "D:\CGAL-5.1\include\CGAL/Surface_mesh/Surface_mesh.h"
1>
- [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andrew Cunningham, 09/08/2020
- Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andrew Cunningham, 09/08/2020
- Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andrew Cunningham, 09/08/2020
- Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andrew Cunningham, 09/09/2020
- Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andreas Fabri, 09/09/2020
- Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andrew Cunningham, 09/09/2020
- Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andreas Fabri, 09/09/2020
- Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andrew Cunningham, 09/09/2020
- Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andrew Cunningham, 09/08/2020
- Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1, Andrew Cunningham, 09/08/2020
Archive powered by MHonArc 2.6.19+.