diff options
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 00af0ae..c3e3c53 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -4325,6 +4325,19 @@ type_has_user_provided_default_constructor (tree t) return false; } +/* Returns true iff class T has a constexpr default constructor. */ + +bool +type_has_constexpr_default_constructor (tree t) +{ + tree fns; + + if (!CLASS_TYPE_P (t)) + return false; + fns = get_default_ctor (t); + return (fns && DECL_DECLARED_CONSTEXPR_P (fns)); +} + /* Returns true iff class TYPE has a virtual destructor. */ bool |