From 184a4de8df0ea3dc79ba672c363e0afa2bb30118 Mon Sep 17 00:00:00 2001 From: Robin Leroy Date: Sat, 23 Mar 2024 22:21:57 +0100 Subject: [PATCH 1/2] ambiguity --- quantities/concepts.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quantities/concepts.hpp b/quantities/concepts.hpp index 2b46b19bbf..6419da00dd 100644 --- a/quantities/concepts.hpp +++ b/quantities/concepts.hpp @@ -49,9 +49,12 @@ concept affine_space = requires(A x, A y) { template concept real_affine_space = affine_space; +// std::integral || std::floating_point rather than +// std::convertible_to because +// the former introduces ambiguities on Sign * Vector. template concept convertible_to_quantity = - std::convertible_to || + std::integral || std::floating_point || is_instance_of_v>; } // namespace internal From 27e38721cc5aaa996a118329bd2e76ea772c515a Mon Sep 17 00:00:00 2001 From: Robin Leroy Date: Sat, 23 Mar 2024 22:22:21 +0100 Subject: [PATCH 2/2] alphabetize --- quantities/concepts.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantities/concepts.hpp b/quantities/concepts.hpp index 6419da00dd..3fb5de6853 100644 --- a/quantities/concepts.hpp +++ b/quantities/concepts.hpp @@ -61,9 +61,9 @@ concept convertible_to_quantity = using internal::additive_group; using internal::affine_space; +using internal::convertible_to_quantity; using internal::real_affine_space; using internal::real_vector_space; -using internal::convertible_to_quantity; using internal::vector_space; } // namespace _concepts