On Mar 2, 2018, Jason Merrill wrote:
> Let's add a comment along the lines of
> /* Let lvalue_kind know this was a glvalue. */
> OK with that change.
Thanks, here's what I'm about to check in.
[C++] [PR84231] overload on cond_expr in template
A non-type-dependent COND_EXPR within a templat
On Fri, Mar 2, 2018 at 2:57 AM, Alexandre Oliva wrote:
> On Feb 28, 2018, Jason Merrill wrote:
>
>> On Wed, Feb 28, 2018 at 12:24 AM, Alexandre Oliva wrote:
>>> + if (processing_template_decl)
>>> +result_type = cp_build_reference_type (result_type, !is_lvalue);
>
>> If !is_lvalue, we don't
On Feb 28, 2018, Jason Merrill wrote:
> On Wed, Feb 28, 2018 at 12:24 AM, Alexandre Oliva wrote:
>> + if (processing_template_decl)
>> +result_type = cp_build_reference_type (result_type, !is_lvalue);
> If !is_lvalue, we don't want a reference type at all, as the result is
> a prvalue. is
On Wed, Feb 28, 2018 at 12:24 AM, Alexandre Oliva wrote:
> + if (processing_template_decl)
> +result_type = cp_build_reference_type (result_type, !is_lvalue);
If !is_lvalue, we don't want a reference type at all, as the result is
a prvalue. is_lvalue should probably rename to is_glvalue.
T
On Feb 27, 2018, Jason Merrill wrote:
> Perhaps it would be easier to add the REFERENCE_TYPE in
> build_conditional_expr_1, adjusting result_type based on
> processing_template_decl and is_lvalue.
It is, indeed!
Here's the patch, regstrapped on i686- and x86_64-linux-gnu. The only
unexpected g
On Tue, Feb 27, 2018 at 1:05 PM, Alexandre Oliva wrote:
> On Feb 15, 2018, Jason Merrill wrote:
>
>> On Thu, Feb 8, 2018 at 9:09 PM, Alexandre Oliva wrote:
>>> + /* If it was supposed to be an rvalue but it's not, adjust
>>> +one of the operands so that any overload resolutio
On Feb 15, 2018, Jason Merrill wrote:
> On Thu, Feb 8, 2018 at 9:09 PM, Alexandre Oliva wrote:
>> + /* If it was supposed to be an rvalue but it's not, adjust
>> +one of the operands so that any overload resolution
>> +taking this COND_EXPR as an operand makes the
On Thu, Feb 8, 2018 at 9:09 PM, Alexandre Oliva wrote:
> + /* If it was supposed to be an rvalue but it's not, adjust
> +one of the operands so that any overload resolution
> +taking this COND_EXPR as an operand makes the correct
> +decisions. See c++/8