aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2019-11-15 09:51:05 -0500
committerJason Merrill <jason@gcc.gnu.org>2019-11-15 09:51:05 -0500
commit9b41ebbcdf9e33285a0eebeb7c841afe20e4a7c1 (patch)
tree63d5b9a564430d47fdbe55993a501c3fa8fa098e /gcc/cp/cp-tree.h
parentf6e20012ef792d659fec65fafecc29736c57f79c (diff)
downloadgcc-9b41ebbcdf9e33285a0eebeb7c841afe20e4a7c1.zip
gcc-9b41ebbcdf9e33285a0eebeb7c841afe20e4a7c1.tar.gz
gcc-9b41ebbcdf9e33285a0eebeb7c841afe20e4a7c1.tar.bz2
Implement P1816R0, class template argument deduction for aggregates.
Rather than reimplement brace elision here, we call reshape_init and then discard the result. We needed to set CLASSTYPE_NON_AGGREGATE a bit more in this patch, since outside a template it's set in check_bases_and_members. * pt.c (maybe_aggr_guide, collect_ctor_idx_types): New. (is_spec_or_derived): Split out from do_class_deduction. (build_deduction_guide): Handle aggregate guide. * class.c (finish_struct): Set CLASSTYPE_NON_AGGREGATE in a template. * cp-tree.h (CP_AGGREGATE_TYPE_P): An incomplete class is not an aggregate. From-SVN: r278298
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 42afe1b..56b75ca 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -4251,7 +4251,7 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
#define CP_AGGREGATE_TYPE_P(TYPE) \
(TREE_CODE (TYPE) == VECTOR_TYPE \
|| TREE_CODE (TYPE) == ARRAY_TYPE \
- || (CLASS_TYPE_P (TYPE) && !CLASSTYPE_NON_AGGREGATE (TYPE)))
+ || (CLASS_TYPE_P (TYPE) && COMPLETE_TYPE_P (TYPE) && !CLASSTYPE_NON_AGGREGATE (TYPE)))
/* Nonzero for a class type means that the class type has a
user-declared constructor. */