aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r--gcc/cp/method.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 7d7ec7d..fdc7604 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -1924,6 +1924,14 @@ implicitly_declare_fn (special_function_kind kind, tree type,
rest_of_decl_compilation (fn, toplevel_bindings_p (), at_eof);
gcc_assert (!TREE_USED (fn));
+ /* Propagate constraints from the inherited constructor. */
+ if (flag_concepts && inherited_ctor)
+ if (tree orig_ci = get_constraints (inherited_ctor))
+ {
+ tree new_ci = copy_node (orig_ci);
+ set_constraints (fn, new_ci);
+ }
+
/* Restore PROCESSING_TEMPLATE_DECL. */
processing_template_decl = saved_processing_template_decl;