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()); } };