From 967c1c9ca997c2b1c596d462ba7934f4d92d7d33 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Fri, 22 Apr 2022 13:26:31 +0200 Subject: [PATCH] fix: `ranged_representation` fixed for clang-12 --- example/include/ranged_representation.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/example/include/ranged_representation.h b/example/include/ranged_representation.h index b620729e..3d7b2a88 100644 --- a/example/include/ranged_representation.h +++ b/example/include/ranged_representation.h @@ -23,6 +23,7 @@ #pragma once #include "validated_type.h" +#include #include #include @@ -30,11 +31,13 @@ template inline constexpr auto is_in_range = [](const auto& v) { return std::clamp(v, T{Min}, T{Max}) == v; }; template -class ranged_representation : public validated_type)> { +using is_in_range_t = decltype(is_in_range); + +template +class ranged_representation : public validated_type> { public: - using base = validated_type)>; - using base::validated_type; - constexpr ranged_representation() : base(T{}) {} + using validated_type>::validated_type; + constexpr ranged_representation() : validated_type>(T{}) {} [[nodiscard]] constexpr ranged_representation operator-() const { return ranged_representation(-this->value()); } };