Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Should the pick semantics be changed?
Re: Should the pick semantics be changed? [message #42364 is a reply to message #42362] Sun, 09 March 2014 13:28 Go to previous messageGo to previous message
piotr5 is currently offline  piotr5
Messages: 107
Registered: November 2005
Experienced Member
well, to formalize a bit more concretely what I said, I believe return statement should at compile-time distinguish between return values local to the function which are not static, and all the return-values which remain in scope after the end of this function respectively could get into scope again (like static values or private members and such). and then based on this distinction the actual return-value should either be constructed with implicit cast to r-value or with the persistent const-l-value-reference constructor.

but then, I'm no it-scientist, so maybe someone else should better post this proposal to the c++ standard committee and to gcc -- if it hasn't already been proposed. I am quite certain gcc could easily implement such a language-change, without waiting for the standards-commitee's decision, I doubt it is explicitly disallowed in c++11...

oh, and thanks for the c++11 branch, looking for this was the reason I started this thread. Very Happy
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: D lang support
Next Topic: [Compilation] Include .asm files in build
Goto Forum:
  


Current Time: Wed May 15 00:31:35 CEST 2024

Total time taken to generate the page: 0.02188 seconds