On Wednesday, 11 July 2012 at 09:49:43 UTC, David Nadlinger wrote:
On Wednesday, 11 July 2012 at 08:56:39 UTC, Artur Skawina wrote:
On 07/11/12 09:00, Tobias Pankrath wrote:
Bar b = new Bar;
auto b2 = &b; // type of b2 is Bar*

So does it meen, that a pointer of type Bar* does not point to the real object?

Yeah, unfortunately.
Can anybody think of a reason to keep the current (broken) behavior?

Why would it be broken? Bar intrinsically is a reference type, so Bar* is a pointer to a reference.

David

The languages conflates reference and instance type for classes. See here http://dpaste.dzfl.pl/a55ad2b6 . I wouldn't say this should change but it is a minor inconsistency I just stumbled on.


Reply via email to