cgal icon indicating copy to clipboard operation
cgal copied to clipboard

Modernize our usage of type_traits

Open sloriot opened this issue 2 years ago • 6 comments

use std::enable_if_t, _v suffix, ....

sloriot avatar Jun 10 '22 08:06 sloriot

@mglisse I did it by hand.

sloriot avatar Jun 13 '22 08:06 sloriot

The ICE of VCV2015 comes probably from the fact that you use C++17 in <CGAL/type_traits/is_iterator.h>

afabri avatar Jun 24 '22 14:06 afabri

I don't, I'm using CGAL_CPP17_INLINE which is empty if Cpp17 is not used...

sloriot avatar Jun 24 '22 15:06 sloriot

I don't, I'm using CGAL_CPP17_INLINE which is empty if Cpp17 is not used...

Sébastien is right. Variable templates are a C++14 feature. I mixed it up with C++17, because their usage in the STL, like std::is_same_v, have been introduced only in C++17, probably because of the lack of inline variables (only since C++17).

lrineau avatar Jun 24 '22 15:06 lrineau

Still failing in CGAL-5.6-Ic-26 on MSVC2015. See here for example.

sloriot avatar Jul 18 '22 13:07 sloriot

@afabri would you find some time to see if we can work around the issue on MSVC2015?

sloriot avatar Aug 03 '22 18:08 sloriot

Successfully tested in CGAL-5.6-Ic-46!

sloriot avatar Aug 15 '22 16:08 sloriot