aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/semantics.cc')
-rw-r--r--gcc/cp/semantics.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/semantics.cc b/gcc/cp/semantics.cc
index bde26e4..311e4f4 100644
--- a/gcc/cp/semantics.cc
+++ b/gcc/cp/semantics.cc
@@ -12565,6 +12565,9 @@ trait_expr_value (cp_trait_kind kind, tree type1, tree type2)
case CPTK_IS_FUNCTION:
return type_code1 == FUNCTION_TYPE;
+ case CPTK_IS_INVOCABLE:
+ return !error_operand_p (build_invoke (type1, type2, tf_none));
+
case CPTK_IS_LAYOUT_COMPATIBLE:
return layout_compatible_type_p (type1, type2);
@@ -12723,6 +12726,7 @@ same_type_ref_bind_p (cp_trait_kind kind, tree type1, tree type2)
case CPTK_IS_CONSTRUCTIBLE:
case CPTK_IS_NOTHROW_CONSTRUCTIBLE:
case CPTK_IS_TRIVIALLY_CONSTRUCTIBLE:
+ case CPTK_IS_INVOCABLE:
case CPTK_REF_CONSTRUCTS_FROM_TEMPORARY:
case CPTK_REF_CONVERTS_FROM_TEMPORARY:
to = type1;
@@ -12825,6 +12829,7 @@ finish_trait_expr (location_t loc, cp_trait_kind kind, tree type1, tree type2)
case CPTK_IS_CONSTRUCTIBLE:
case CPTK_IS_CONVERTIBLE:
+ case CPTK_IS_INVOCABLE:
case CPTK_IS_NOTHROW_CONSTRUCTIBLE:
case CPTK_IS_NOTHROW_CONVERTIBLE:
case CPTK_IS_TRIVIALLY_CONSTRUCTIBLE: