Home » U++ Library support » U++ Core » Vector<T>::Set(int i, T&& x) proposal
Re: Vector<T>::Set(int i, T&& x) proposal [message #49368 is a reply to message #49366] |
Wed, 31 January 2018 20:01   |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
mirek wrote on Wed, 31 January 2018 13:34
Do you see any problem with trivial implementation
void Vector::Set(int i, T&& x) { At(i) = pick(x); }
IMHO, it should look like below.
T& Vector::Set(int i, T&& x) { return At(i) = pick(x); }
My current coding pattern (without the T&& version) looks like that:
T& v = vector.At(ind) = T(args);
Regards,
Novo
|
|
|
 |
|
Vector<T>::Set(int i, T&& x) proposal
By: Novo on Tue, 19 December 2017 23:30
|
 |
|
Re: Vector<T>::Set(int i, T&& x) proposal
By: mirek on Sun, 28 January 2018 22:47
|
 |
|
Re: Vector<T>::Set(int i, T&& x) proposal
By: Novo on Tue, 30 January 2018 03:30
|
 |
|
Re: Vector<T>::Set(int i, T&& x) proposal
By: mirek on Wed, 31 January 2018 19:34
|
 |
|
Re: Vector<T>::Set(int i, T&& x) proposal
By: Novo on Wed, 31 January 2018 20:01
|
 |
|
Re: Vector<T>::Set(int i, T&& x) proposal
By: mirek on Thu, 01 February 2018 18:53
|
 |
|
Re: Vector<T>::Set(int i, T&& x) proposal
By: Novo on Thu, 01 February 2018 19:03
|
Goto Forum:
Current Time: Sat Apr 26 05:57:29 CEST 2025
Total time taken to generate the page: 0.02934 seconds
|