Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1


Chronological Thread 
  • From: Andrew Cunningham <>
  • To:
  • Subject: Re: [cgal-discuss] CGAL 5.1 compile errors when using Intel Compiler 19.1
  • Date: Tue, 8 Sep 2020 14:39:40 -0700
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:vWrlCRx8AqegW4DXCy+O+j09IxM/srCxBDY+r6Qd2+gRIJqq85mqBkHD//Il1AaPAdyFrase16GG6ujJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6JvjvGo7Vks+7y/2+94fcbglVhTexe65+IAu5oAnetcQanJZpJ7osxBfOvnZGYfldy3lyJVKUkRb858Ow84Bm/i9Npf8v9NNOXLvjcaggQrNWEDopM2Yu5M32rhbDVheA5mEdUmoNjBVFBRXO4QzgUZfwtiv6sfd92DWfMMbrQ704RSiu4qF2QxLulSwJNSM28HvPh8N/gqJUohKvqRJ8zYDJfo+aKOFzcbnBcd4AX2dNQtpdWi5HD4ihb4UPFe0BPeNAooThoVsBsAG+CheiBejy1DJIm3n23as70+QnHgHG3BYvH9cTu3nTsNr1O70dUeSuwabS1DnMc+5W2TH76IjJdBAhrvGMUqh1ccbL1UYvEAbFg0yWpIf4MDybyv4DvHKH7+p8S+2vkWgnphlzrzWvycohhInEiI0Rx13E9Ch0zps5KNO2RkN0YNOoDJhduiGeOoZoQs0vXmNltik+x7ACpJO2fCYExZUnyhPCbfGMbouG4gr7WeqPPTt1gGhpdbG/ihqo70Ss1/HwWtO73VpXqCdOj8PCuWoX1xPJ78iKUvt98Vml2TaIzw3T7/tLIUEwlabCLJ4h3qM8moMdsUnMAyP6gkr2jKiRdkUr/uin9f7rbanhpp+ZL4N0iwf+PboymsGnH+g0LgwDU3KY9Om8zrHv41D1TKlQgvA5j6XVqJXaKt4apq69DQ9VyIEj6xOnAji8zdsYmHgHLFRedR2dloTmJ0zOIPb+Dfe+hVSsnzdryOrDPrH7HprNKX3DnK/7fblh805c1BYzzddH6p1IBbEOOvbzVlbsu9zZFR82LxG0w/38CNhmzYMfWWePAreDP6/IsF+I4PgvI+iWa4MPtjb9Matt2/m7hnAwnRoRfLKiwIAMQHG+BPVvZUuDMlT2hdJUOGEGpAchBMf3jluDVzFTbnP6C6kz7zUTAcetEIHFR4aigLWEmiy8G8sFNSh9FlmQHCKwJM2/UPAWZXfKe5Mzonk/TbGkDrQZ+1S2rgajm+hua+HJ/CsZs53j3d0z7OrWx0lrqG5ESv+F2mTIdFla22MFQzhsgfJ6qE15j1CfiO1236UeGttU6PdEFAw9MMyElr0oO5XJQgvEO+yxZhOjS9SiDys2S4thkdZLaFt7HdSkgRDK2myhBLpHz7E=

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>)
#endif

INMHO, 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.1

On Tue, Sep 8, 2020 at 12:34 PM Andrew Cunningham <> wrote:
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;

Andrew



1>D:\CGAL-5.1\include\CGAL/Cartesian/Line_3.h(38): error : incomplete type is not allowed
1>      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>

etc more like this.



Archive powered by MHonArc 2.6.19+.

Top of Page