From c09323804c6c6d42c052b1c60061134261e515fc Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Sat, 2 Nov 2024 19:54:50 +0100 Subject: Add function with invoke and result_of_t --- asl/meta.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'asl/meta.hpp') diff --git a/asl/meta.hpp b/asl/meta.hpp index d253dda..2085118 100644 --- a/asl/meta.hpp +++ b/asl/meta.hpp @@ -35,6 +35,8 @@ template auto _as_rref_helper(...) -> id; template using as_lref_t = decltype(_as_lref_helper(0))::type; template using as_rref_t = decltype(_as_rref_helper(0))::type; +template consteval as_rref_t declval() {} + template struct _un_ref_t { using type = T; }; template struct _un_ref_t { using type = T; }; template struct _un_ref_t { using type = T; }; @@ -67,9 +69,13 @@ template concept trivially_destructible = __is_trivially_destructibl template concept trivially_copyable = __is_trivially_copyable(T); +// @Todo Rename concepts (_from) template concept convertible = __is_convertible(From, To); +template +concept derived_from = __is_class(Derived) && __is_class(Base) && convertible; + using nullptr_t = decltype(nullptr); template struct _un_const_helper { using type = T; }; -- cgit