This fixes an issue where the return type of an auto-deduced function gets classified as a parameter pack if it's called in a decltype expression inside of a type expansion.
The solution is to turn off the predicate type_pack_expansion_p when traversing a decltype expression to disable the classification of any auto types as parameter packs. Bootstrapped and regression tested on x86_64-linux 2015-11-19 Ryan Burn <cont...@rnburn.com> PR c++/68396 * pt.c (find_parameter_packs_r): Add case statement to handle DECLTYPE_TYPE. When traversing the DECLTYPE_TYPE_EXPR, set type_pack_expansion_p to false * g++.dg/concepts/pr68396.C: New test
pr68396.patch
Description: Binary data