geom/ops: workaround ICE using requires
for distance
clang requires `A<S,T>` for the `enable_if` condition, and this provokes an ICE under GCC. A `requires` clause works identically and satisfies both compilers.
This commit is contained in:
parent
50b2105df5
commit
59c1c9cc9e
@ -55,12 +55,12 @@ namespace cruft::geom {
|
|||||||
size_t S,
|
size_t S,
|
||||||
typename T,
|
typename T,
|
||||||
template <size_t,typename> class A,
|
template <size_t,typename> class A,
|
||||||
template <size_t,typename> class B,
|
template <size_t,typename> class B
|
||||||
typename = std::enable_if_t<
|
>
|
||||||
|
requires (
|
||||||
!std::is_same_v<cruft::point<S,T>, A<S,T>> &&
|
!std::is_same_v<cruft::point<S,T>, A<S,T>> &&
|
||||||
!std::is_same_v<cruft::point<S,T>, B<S,T>>
|
!std::is_same_v<cruft::point<S,T>, B<S,T>>
|
||||||
>
|
)
|
||||||
>
|
|
||||||
T
|
T
|
||||||
distance (A<S,T>, B<S,T>);
|
distance (A<S,T>, B<S,T>);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user