style: Prefix concept still does not work :-(

This commit is contained in:
Mateusz Pusz
2020-09-08 13:14:21 +02:00
parent d8e8a94c5b
commit f1bb1910f3

View File

@@ -43,17 +43,21 @@ template<typename T>
concept PrefixFamily = std::derived_from<T, prefix_family>; concept PrefixFamily = std::derived_from<T, prefix_family>;
// Prefix // Prefix
// TODO gcc:92150 template<PrefixFamily PF, ratio R>
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92150 struct prefix_base;
// namespace detail {
// template<typename T> namespace detail {
// inline constexpr bool is_prefix = false;
// template<typename PrefixFamily, Ratio R, basic_fixed_string Symbol> struct is_derived_from_prefix_base_impl {
// inline constexpr bool is_prefix<prefix<PrefixFamily, R, Symbol>> = true; template<typename PF, ratio R>
static constexpr std::true_type check_base(const prefix_base<PF, R>&);
static constexpr std::false_type check_base(...);
};
// } // namespace detail template<typename T>
inline constexpr bool is_derived_from_prefix_base = decltype(is_derived_from_prefix_base_impl::check_base(std::declval<T>()))::value;
} // namespace detail
/** /**
* @brief A concept matching a symbol prefix * @brief A concept matching a symbol prefix
@@ -61,9 +65,8 @@ concept PrefixFamily = std::derived_from<T, prefix_family>;
* Satisfied by all specializations of `prefix`. * Satisfied by all specializations of `prefix`.
*/ */
template<typename T> template<typename T>
// concept Prefix = detail::is_prefix<T>; // concept Prefix = detail::is_derived_from_prefix_base<T>;
concept Prefix = true; concept Prefix = true; // TODO: still some bug out there :-(
/** /**
* @brief A concept matching unit's ratio * @brief A concept matching unit's ratio