https://issues.dlang.org/show_bug.cgi?id=12625
--- Comment #8 from Sobirari Muhomori <[email protected]> --- (In reply to Steven Schveighoffer from comment #7) > I think we can say safely that slicing an rvalue return cannot lead to > anything good. > > As for the example of why it should be allowed, I'm not convinced. tempCString is another example of an rvalue reference. Works good so far. > example requires blind faith that the receiver of the slice never does > anything bad with it, and assumes the compiler doesn't cleverly reclaim the > memory for the rvalue seeing as it wasn't used anywhere. If the temporary isn't used, it should be reclaimed. --
