Home » U++ Library support » U++ Core » why not "T & Add(const T & x)" in all containers
Re: why not "T & Add(const T & x)" in all containers [message #28101 is a reply to message #27998] |
Mon, 16 August 2010 09:06   |
 |
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
it's actually the same behaviour as with T& Array::Attach(T* newt);
and merly a logical unification of interface, that anything that ends beeing an object, no matter newly added or as copy, should be instantly available, without the need to again access the container to get the same. here, it actually doesnt matter the container type, it's same situation for Vector and Array.
a practical use is this:
crating new container objects, based on some 'template' objects, and remodifying stuff that is actually different, on the new created object, pushing it somewhere to do something. this would use in case of Array:
void Array::Add(cibst T&),
then
T& Array::operator[](int i) with Array::GetCount()-1.
actually 3 invokations, that could be done in one.
it's maybe more of estetic use but could again add to Ultimate's short and reading friendly code
|
|
|
 |
|
why not "T & Add(const T & x)" in all containers
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: kohait00 on Tue, 03 August 2010 11:15
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: kohait00 on Tue, 03 August 2010 16:06
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: kohait00 on Wed, 04 August 2010 09:57
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: kohait00 on Thu, 05 August 2010 08:35
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: mrjt on Thu, 05 August 2010 09:55
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: kohait00 on Thu, 05 August 2010 10:10
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: mirek on Fri, 06 August 2010 11:27
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: kohait00 on Fri, 06 August 2010 11:48
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: kohait00 on Mon, 09 August 2010 08:50
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: mirek on Fri, 13 August 2010 09:38
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: kohait00 on Mon, 16 August 2010 09:06
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: kohait00 on Mon, 30 August 2010 10:46
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: mirek on Mon, 06 September 2010 10:53
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: kohait00 on Mon, 06 September 2010 11:52
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: mirek on Wed, 08 September 2010 09:00
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: rylek on Wed, 08 September 2010 10:24
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: kohait00 on Wed, 08 September 2010 10:54
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: mirek on Wed, 08 September 2010 11:30
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: mirek on Fri, 17 September 2010 08:11
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: kohait00 on Fri, 17 September 2010 09:15
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: kohait00 on Thu, 21 October 2010 09:02
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: mirek on Thu, 21 October 2010 11:10
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: kohait00 on Thu, 21 October 2010 11:54
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: kohait00 on Wed, 30 March 2011 10:54
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: mirek on Sat, 16 April 2011 20:31
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: kohait00 on Sun, 17 April 2011 14:46
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: mirek on Sun, 17 April 2011 21:43
|
 |
|
Re: why not "T & Add(const T & x)" in all containers
By: kohait00 on Mon, 18 April 2011 09:00
|
Goto Forum:
Current Time: Mon Aug 25 02:29:48 CEST 2025
Total time taken to generate the page: 0.04365 seconds
|