Home » Community » Coffee corner » C++11
Re: C++11 [message #38171 is a reply to message #38150] |
Mon, 03 December 2012 11:04   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
Lance wrote on Sun, 02 December 2012 15:00 |
A class not written with pick_ in mind will(or may?) not work correctly with Upp::Vector<>, even if it meets all the interface requirements superficially.
|
Actually, that is not true. pick_ is in no way related with generic requirement of Vector elements (only 2-3 methods require it).
Please note that pick semantics and Moveable are two very different things.
pick indeed is a variant of rvalue and it might have sense to replace it with r-value. Unfortunately, rvalue lacks composition rules, which means that it has to be reimplemented for any composite type, while pick generates compiler generated composite pick operations without problems. How much more code it would mean in practice is something that I plan to test is some branch in future. But e.g. for something like RichTxt::Para, it will be nasty.
Anyway, pick is not used for performance reasons in Vector. Moveable is. And that is still a bit ahead than pick/&&.
Pick is rather interface issue, allows you to pass objects from place to place without copying them (which do not even has to be available).
Mirek
|
|
|
 |
|
C++11
|
 |
|
Re: C++11
By: mirek on Fri, 14 October 2011 12:18
|
 |
|
Re: C++11
By: lectus on Sat, 03 December 2011 12:03
|
 |
|
Re: C++11
|
 |
|
Re: C++11
By: Lance on Sun, 02 December 2012 15:08
|
 |
|
Re: C++11
|
 |
|
Re: C++11
By: Lance on Sun, 02 December 2012 18:05
|
 |
|
Re: C++11
By: Lance on Sun, 02 December 2012 18:47
|
 |
|
Re: C++11
By: Lance on Sun, 02 December 2012 19:30
|
 |
|
Re: C++11
|
 |
|
Re: C++11
By: Lance on Sun, 02 December 2012 21:00
|
 |
|
Re: C++11
By: mirek on Mon, 03 December 2012 11:04
|
 |
|
Re: C++11
By: mirek on Mon, 03 December 2012 11:10
|
 |
|
Re: C++11
By: Lance on Tue, 04 December 2012 00:55
|
 |
|
Re: C++11
By: mirek on Tue, 04 December 2012 08:08
|
 |
|
Re: C++11
By: Lance on Tue, 19 March 2013 03:24
|
 |
|
Re: C++11
|
 |
|
Re: C++11
By: mirek on Sun, 24 June 2012 12:50
|
 |
|
Re: C++11
By: unodgs on Sun, 24 June 2012 13:02
|
 |
|
Re: C++11
By: mirek on Sun, 24 June 2012 13:13
|
 |
|
Re: C++11
By: unodgs on Sun, 24 June 2012 13:21
|
 |
|
Re: C++11
|
 |
|
Re: C++11
By: lectus on Wed, 27 June 2012 01:29
|
 |
|
Re: C++11
By: mirek on Thu, 28 June 2012 08:16
|
 |
|
Re: C++11
By: Lance on Sun, 02 December 2012 06:18
|
Goto Forum:
Current Time: Tue Apr 29 16:10:19 CEST 2025
Total time taken to generate the page: 0.00917 seconds
|