[C++ Patch] PR 57543

Jason Merrill jason@redhat.com
Wed May 28 15:14:00 GMT 2014


On 05/28/2014 06:15 AM, Paolo Carlini wrote:
> +  bool do_inject = (!current_class_ref
> +		    && TREE_CODE (t) == METHOD_TYPE
> +		    && TREE_CODE (TREE_TYPE (t)) == DECLTYPE_TYPE);

Let's do this for any METHOD_TYPE; the decltype could be nested as a 
template argument.  And current_class_ref might be for the wrong class.

> +      /* DR 1207: 'this' is in scope in the trailing return type.  */
> +      tree this_type = (current_class_type
> +			? current_class_type
> +			: TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (t))));

And here let's use class_of_this_parm unconditionally.

Jason



More information about the Gcc-patches mailing list