On 05/23/2017 01:56 PM, Jonathan Wakely wrote:
On 18/05/17 13:44 -0400, Nathan Sidwell wrote:

References can't be CV qualified, so the REFERENCE_TYPE check seems superfluous?

True. I did it because that matches the semantics of the cast
according to the standard, but it isn't needed here. Is it worth
keeping anyway, to avoid a redundant call to cv_unqualified?

I don't think it's worth checking.

It also occurs to me that checking for !CLASS_TYPE_P (type) isn't
needed in build_const_cast_1 because you can't const_cast to a class
type, only reference or pointer types.

true.

nathan

--
Nathan Sidwell

Reply via email to