re PR c++/54859 (constexpr in template alias rejected as non-constant)
PR c++/54859 * pt.c (check_instantiated_arg): Don't complain about dependent args. From-SVN: r193368
This commit is contained in:
parent
7dbb85a793
commit
2a28e76a78
|
@ -1,5 +1,8 @@
|
|||
2012-11-09 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/54859
|
||||
* pt.c (check_instantiated_arg): Don't complain about dependent args.
|
||||
|
||||
* tree.c (cxx_attribute_table): Add abi_tag attribute.
|
||||
(check_abi_tag_redeclaration, handle_abi_tag_attribute): New.
|
||||
* class.c (find_abi_tags_r, check_abi_tags): New.
|
||||
|
|
|
@ -14362,6 +14362,8 @@ tsubst_copy_and_build (tree t,
|
|||
static bool
|
||||
check_instantiated_arg (tree tmpl, tree t, tsubst_flags_t complain)
|
||||
{
|
||||
if (dependent_template_arg_p (t))
|
||||
return false;
|
||||
if (ARGUMENT_PACK_P (t))
|
||||
{
|
||||
tree vec = ARGUMENT_PACK_ARGS (t);
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
2012-11-09 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/54859
|
||||
* g++.dg/cpp0x/alias-decl-25.C: New.
|
||||
|
||||
* g++.dg/abi/abi-tag1.C: New.
|
||||
* g++.dg/abi/abi-tag2.C: New.
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
// PR c++/54859
|
||||
// { dg-options -std=c++11 }
|
||||
|
||||
template<unsigned N>
|
||||
using Num = int;
|
||||
|
||||
template<typename... Types>
|
||||
using Count = Num<sizeof...(Types)>;
|
||||
|
||||
Count<int, char, void> i;
|
Loading…
Reference in New Issue