This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50837] [c++0x] static_assert and constexpr in template class
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 25 Oct 2011 01:10:59 +0000
- Subject: [Bug c++/50837] [c++0x] static_assert and constexpr in template class
- Auto-submitted: auto-generated
- References: <bug-50837-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50837
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-25 01:10:59 UTC ---
I can't believe it's so easy: fixes the testcase and passes the testsuite
(modulo a trivial tweak to a dg-error string):
Index: cp/pt.c
===================================================================
--- cp/pt.c (revision 180413)
+++ cp/pt.c (working copy)
@@ -13041,7 +13041,7 @@ tsubst_copy_and_build (tree t,
decl = finish_id_expression (t, decl, NULL_TREE,
&idk,
integral_constant_expression_p,
-
/*allow_non_integral_constant_expression_p=*/false,
+
/*allow_non_integral_constant_expression_p=*/true,
&non_integral_constant_expression_p,
/*template_p=*/false,
/*done=*/true,