From f4122c857f9fc9f80e7fd04fac046d2419b49e4b Mon Sep 17 00:00:00 2001 From: Joseph Edwards Date: Fri, 28 Jun 2024 15:36:54 +0100 Subject: [PATCH] Fix type deductions --- include/libsemigroups/to-presentation.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/libsemigroups/to-presentation.hpp b/include/libsemigroups/to-presentation.hpp index f2f9c55ef..c4b0be895 100644 --- a/include/libsemigroups/to-presentation.hpp +++ b/include/libsemigroups/to-presentation.hpp @@ -57,7 +57,9 @@ namespace libsemigroups { // with no template WordOutput, // always use word_type, and can be // converted after if desirable - Presentation to_presentation(FroidurePinBase& fp) { + auto to_presentation(FroidurePinBase& fp) + -> std::enable_if_t, + Presentation> { Presentation p; p.alphabet(fp.number_of_generators()); for (auto it = fp.cbegin_rules(); it != fp.cend_rules(); ++it) { @@ -70,7 +72,10 @@ namespace libsemigroups { return p; } - static inline Presentation to_presentation(FroidurePinBase& fp) { + template + auto to_presentation(FroidurePinBase& fp) + -> std::enable_if_t, + Presentation> { Presentation p; p.alphabet(fp.number_of_generators()); for (auto it = fp.cbegin_rules(); it != fp.cend_rules(); ++it) {