}
return false;
}
- else if (TREE_CODE (type) == TYPENAME_TYPE)
- return false;
- else if (TREE_CODE (type) == DECLTYPE_TYPE)
- return false;
else if (TREE_CODE (type) == NULLPTR_TYPE)
return false;
- /* A bound template template parm could later be instantiated to have a valid
- nontype parm type via an alias template. */
- else if (cxx_dialect >= cxx11
- && TREE_CODE (type) == BOUND_TEMPLATE_TEMPLATE_PARM)
+ else if (TREE_CODE (type) == BOUND_TEMPLATE_TEMPLATE_PARM
+ && cxx_dialect < cxx11)
+ /* Fall through; before C++11 alias templates, a bound ttp
+ always instantiates into a class type. */;
+ else if (WILDCARD_TYPE_P (type))
+ /* Any other wildcard type not already handled above is allowed. */
return false;
else if (TREE_CODE (type) == COMPLEX_TYPE)
/* Fall through. */;