[Issue 10921] scoped returns a reference to an uninitialized object
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Aug 30 06:42:16 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10921
--- Comment #4 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-08-30 06:42:16 PDT ---
(In reply to comment #3)
> We should disable the implicit conversion from Scoped to Point.
Maybe.. but I have a feeling this would break code. E.g.:
void callback(scoped Event event) { }
auto event = scoped!Event(...);
callback(event); // implicit, but OK
Now if the 'scope' storage class actually did something useful in a parameter
list, then the above would also be safe.
I suppose you want this to become:
callback(cast(Event)event);
I could live with that, but I'm not sure if any code for other people would
break. I hear relatively little about people using scoped (most people seem to
use emplace instead).
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list