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
10
geom/ops.hpp
10
geom/ops.hpp
@ -55,12 +55,12 @@ namespace cruft::geom {
|
||||
size_t S,
|
||||
typename T,
|
||||
template <size_t,typename> class A,
|
||||
template <size_t,typename> class B,
|
||||
typename = std::enable_if_t<
|
||||
!std::is_same_v<cruft::point<S,T>, A<S,T>> &&
|
||||
!std::is_same_v<cruft::point<S,T>, B<S,T>>
|
||||
>
|
||||
template <size_t,typename> class B
|
||||
>
|
||||
requires (
|
||||
!std::is_same_v<cruft::point<S,T>, A<S,T>> &&
|
||||
!std::is_same_v<cruft::point<S,T>, B<S,T>>
|
||||
)
|
||||
T
|
||||
distance (A<S,T>, B<S,T>);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user