Date: Sat, 2 Nov 2019 08:41:47 +0000
>
> references apply only to class types, and its a valid question because the
> template argument itself is a const-lvalue if it is a class type.
>
Yes, you are right, it is possible now to take address of a class type
arguments (and it looks like it even works in the latest gcc: godbolt
<https://godbolt.org/z/VScPLA>)...
Well, then it makes sense to make them references. So that the address of a
class type argument taken inside the scope of a class were the same as the
address of the same argument taken outside.
> references apply only to class types, and its a valid question because the
> template argument itself is a const-lvalue if it is a class type.
>
Yes, you are right, it is possible now to take address of a class type
arguments (and it looks like it even works in the latest gcc: godbolt
<https://godbolt.org/z/VScPLA>)...
Well, then it makes sense to make them references. So that the address of a
class type argument taken inside the scope of a class were the same as the
address of the same argument taken outside.
Received on 2019-11-02 03:44:31