re PR c++/61134 ([C++11] bogus "no matching function for call...")
PR c++/61134 * pt.c (pack_deducible_p): Handle canonicalization. From-SVN: r211159
This commit is contained in:
parent
a21e55d2bb
commit
cfc8dced31
@ -1,3 +1,8 @@
|
||||
2014-06-02 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/61134
|
||||
* pt.c (pack_deducible_p): Handle canonicalization.
|
||||
|
||||
2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
* pt.c (tsubst_function_type): Initialize arg_types.
|
||||
|
@ -15765,7 +15765,7 @@ pack_deducible_p (tree parm, tree fn)
|
||||
continue;
|
||||
for (packs = PACK_EXPANSION_PARAMETER_PACKS (type);
|
||||
packs; packs = TREE_CHAIN (packs))
|
||||
if (TREE_VALUE (packs) == parm)
|
||||
if (template_args_equal (TREE_VALUE (packs), parm))
|
||||
{
|
||||
/* The template parameter pack is used in a function parameter
|
||||
pack. If this is the end of the parameter list, the
|
||||
|
24
gcc/testsuite/g++.dg/cpp0x/variadic158.C
Normal file
24
gcc/testsuite/g++.dg/cpp0x/variadic158.C
Normal file
@ -0,0 +1,24 @@
|
||||
// PR c++/61134
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
struct Base { };
|
||||
|
||||
template <typename>
|
||||
struct Fixed {
|
||||
typedef const char* name;
|
||||
};
|
||||
|
||||
template <typename VT, typename... Fields>
|
||||
void New(const char* name,
|
||||
typename Fixed<Fields>::name... field_names);
|
||||
|
||||
template <typename VT, typename... Fields>
|
||||
void CreateMetric(const char* name,
|
||||
typename Fixed<Fields>::name... field_names,
|
||||
const Base&) { }
|
||||
|
||||
|
||||
void Fn()
|
||||
{
|
||||
CreateMetric<int, const char*>("abcd", "def", Base());
|
||||
}
|
Loading…
Reference in New Issue
Block a user