Skip to content

Commit f5eff41

Browse files
committed
testsuite: Fix up g++.dg/reflect/type_trait14.C for -fimplicit-constexpr [PR124844]
The g++.dg/reflect/type_trait14.C test FAILs with -fimplicit-constexpr, because in that case NLType is actually a literal type rather than non-literal type and so is structural type too. Fixed by making sure it is not a literal type even with -fimplicit-constexpr. 2026-04-10 Jakub Jelinek <jakub@redhat.com> PR c++/124844 * g++.dg/reflect/type_trait14.C (NLType::~NLType): Move definition out of the class. Reviewed-by: Jason Merrill <jason@redhat.com>
1 parent 6535e20 commit f5eff41

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

gcc/testsuite/g++.dg/reflect/type_trait14.C

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ struct NLType {
2525
NLType () : _M_i(0) { }
2626
constexpr NLType (int __i) : _M_i(__i) { }
2727
NLType (const NLType &__other) : _M_i(__other._M_i) { }
28-
~NLType () { _M_i = 0; }
28+
~NLType ();
2929
};
30+
NLType::~NLType () { _M_i = 0; }
3031

3132
static_assert (is_structural_type (^^int));
3233
static_assert (is_structural_type (^^float));

0 commit comments

Comments
 (0)