From 59c1c9cc9edeaaabbb5505c50860cef3481c57a0 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 19 Apr 2021 16:47:22 +1000 Subject: [PATCH] geom/ops: workaround ICE using `requires` for `distance` clang requires `A` for the `enable_if` condition, and this provokes an ICE under GCC. A `requires` clause works identically and satisfies both compilers. --- geom/ops.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/geom/ops.hpp b/geom/ops.hpp index ee21a308..7f1eed6d 100644 --- a/geom/ops.hpp +++ b/geom/ops.hpp @@ -55,12 +55,12 @@ namespace cruft::geom { size_t S, typename T, template class A, - template class B, - typename = std::enable_if_t< - !std::is_same_v, A> && - !std::is_same_v, B> - > + template class B > + requires ( + !std::is_same_v, A> && + !std::is_same_v, B> + ) T distance (A, B);