Topic: Could we remove the size() method in the std::list<T>?
Author: euloanty@live.com
Date: Sat, 9 Nov 2013 08:01:49 -0800 (PST)
Raw View
------=_Part_1025_1160297.1384012909072
Content-Type: text/plain; charset=ISO-8859-1
Could we remove the size() method in the std::list<T>?
This method is too strange in the std::list<T>.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_1025_1160297.1384012909072
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"defaultFont" style=3D"color: rgb(0, 0, 0);">=
Could we remove the size() method in the std::list<T>?<br></div>=
<div class=3D"defaultFont" style=3D"color: rgb(0, 0, 0);" data-signatureblo=
ck=3D"true"><div class=3D"defaultFont">This method is too strange in the st=
d::list<T>.</div><div class=3D"defaultFont"><br></div></div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_1025_1160297.1384012909072--
.
Author: euloanty@live.com
Date: Sat, 9 Nov 2013 08:01:59 -0800 (PST)
Raw View
------=_Part_62_19744061.1384012919224
Content-Type: text/plain; charset=ISO-8859-1
Could we remove the size() method in the std::list<T>?
This method is too strange in the std::list<T>.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_62_19744061.1384012919224
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"defaultFont" style=3D"color: rgb(0, 0, 0);">=
Could we remove the size() method in the std::list<T>?<br></div>=
<div class=3D"defaultFont" style=3D"color: rgb(0, 0, 0);" data-signatureblo=
ck=3D"true"><div class=3D"defaultFont">This method is too strange in the st=
d::list<T>.</div><div class=3D"defaultFont"><br></div></div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_62_19744061.1384012919224--
.
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Sat, 9 Nov 2013 18:13:04 +0200
Raw View
--001a11c2b76217944704eac0c698
Content-Type: text/plain; charset=ISO-8859-1
On 9 November 2013 18:01, <euloanty@live.com> wrote:
> Could we remove the size() method in the std::list<T>?
> This method is too strange in the std::list<T>.
>
>
>
Which part of it is "strange"?
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
--001a11c2b76217944704eac0c698
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><br><div class=3D"gmail=
_quote">On 9 November 2013 18:01, <span dir=3D"ltr"><<a href=3D"mailto:=
euloanty@live.com" target=3D"_blank">euloanty@live.com</a>></span> wrote=
:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-le=
ft:1px #ccc solid;padding-left:1ex">
<div class=3D"HOEnZb"><div class=3D"h5"><div dir=3D"ltr"><div style>Could w=
e remove the size()=A0method in the std::list<T>?<br></div><div style=
><div>This method is too strange in the std::list<T>.</div><div><br><=
br></div>
</div></div></div></div></blockquote><div><br></div><div>Which part of it i=
s "strange"? <br></div></div><br></div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--001a11c2b76217944704eac0c698--
.
Author: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@gmail.com>
Date: Sat, 9 Nov 2013 17:13:16 +0100
Raw View
2013/11/9 <euloanty@live.com>:
> Could we remove the size() method in the std::list<T>?
> This method is too strange in the std::list<T>.
I have not really understand the reason for such a change, please
explain. "Too strange" is not really an objective criterion to me.
Irrespective of the motivation it should be noted that the size()
member of list exists from the initial release of the C++ Standard
Library. Removing that member would break well-defined code.
- Daniel
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
.
Author: euloanty@live.com
Date: Sat, 9 Nov 2013 08:33:06 -0800 (PST)
Raw View
------=_Part_1057_8721406.1384014786657
Content-Type: text/plain; charset=ISO-8859-1
1.It makes most of the operations of std::list slower;
2.std::forward_list don't have this method. This makes people very confused.
3.the method splice() becomes much slower.
4.We know our library couldn't make people very confused. That was why we
didn't define the operator[] in the std::list<>;
5.The function of this method can be easily implied by programmers
themselves. We know this function had been defined clearly in cpp11, but in
the cpp98, its time-complexity is not defined clearly. For this reason, in
the past we almost didn't use it. So I think this change won't make so
many codes invalid.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_1057_8721406.1384014786657
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>1.It makes most of the operations of std::list s=
lower;</div><div>2.std::forward_list don't have this method. This makes peo=
ple very confused.</div><div>3.the method splice() becomes much s=
lower.</div><div>4.We know our library couldn't make people very confused. =
That was why we didn't define the operator[] in the std::list<>;=
</div><div>5.The function of this method can be easily implied by prog=
rammers themselves. We know this function had been defined clearly in =
cpp11, but in the cpp98, its time-complexity is not defined clearly. F=
or this reason, in the past we almost didn't use it. So &nbs=
p;I think this change won't make so many codes invalid.<br></div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_1057_8721406.1384014786657--
.
Author: MANTOSH KUMAR <mantosh4u@gmail.com>
Date: Sat, 9 Nov 2013 22:26:36 +0530
Raw View
--001a11c3e47cf2726204eac162a6
Content-Type: text/plain; charset=ISO-8859-1
Hi,
Frankly Speaking i also did not understand your points regarding the
removing the std::list<T>::size() method from the standard.
However here is my opinion on your points:
1. It makes most of the operations of std::list slower.
How std::list<T>::size() makes most of the operation slower? I mean i did
not get how a method (like inline size() )of the class can affect the other
operation.
2. std::forward_list don't have this method. This makes people very confused
size() is not defined for this container class because purpose of
std::forward_list is different and it should be used for very small or
empty situation. And to optimize and to save one extra word of size of
object of this class, it only store a single base pointer.
3.the method splice() becomes much slower.
Again i did not understand how size() can impact the performance of
splice() method in this std::list<T>
4.We know our library couldn't make people very confused. That was why we
didn't define the operator[] in the std::list<>;
operator[] is not defined for std::list<T> not because of confusion and
some other reason. Its not there because its not natural for std::list<T>
and if someone would need this operator[], it would be terribly slow as
operator[] is natural for random iterator(std::vector<T>).
5.The function of this method can be easily implied by programmers
themselves. We know this function had been defined clearly in cpp11, but in
the cpp98, its time-complexity is not defined clearly. For this reason, in
the past we almost didn't use it. So I think this change won't make so
many codes invalid.
If you are talking about the std::list<T>::size() time-complexity then i
think its inline function and even it do not require the cost of a simple
function call.
I agree with the Daniel comment that its there in the standard since the
inspection of STL library in C++. So no way it should be removed from the
standard.
Alexander Stepenov and Bjrane both advocate to use std::vector<T> instead
of any other container unless you have very solid reason to do it
otherwise. May be you should start thinking to use the std::vector<T> and
should measure the performance of your program.
Thanks
Mantosh Kumar
On Sat, Nov 9, 2013 at 10:03 PM, <euloanty@live.com> wrote:
> 1.It makes most of the operations of std::list slower;
> 2.std::forward_list don't have this method. This makes people
> very confused.
> 3.the method splice() becomes much slower.
> 4.We know our library couldn't make people very confused. That was why we
> didn't define the operator[] in the std::list<>;
> 5.The function of this method can be easily implied by programmers
> themselves. We know this function had been defined clearly in cpp11, but in
> the cpp98, its time-complexity is not defined clearly. For this reason, in
> the past we almost didn't use it. So I think this change won't make so
> many codes invalid.
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> Visit this group at
> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
--001a11c3e47cf2726204eac162a6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div><div><div><div>Hi, <br><br></div><div>Frankly Speakin=
g i also did not understand your points regarding the removing the std::lis=
t<T>::size() method from the standard.<br><br></div><div>However here=
is my opinion on your points:<br>
<br></div><div><br>1. It makes most of the operations of=A0std::list slower=
..<br></div>How std::list<T>::size() makes most of the operation slowe=
r? I mean i did not get how a method (like inline size() )of the class can =
affect the other operation.<br>
<br></div>2. std::forward_list don't have this method. This makes peopl=
e very=A0confused<br></div>size() is not defined for this container class b=
ecause purpose of std::forward_list is different and it should be used for =
very small or empty situation. And to optimize and to save one extra word o=
f size of object of this class, it only store a single base pointer. <br>
<br>3.the method=A0splice() becomes much slower.<br></div>Again i did not u=
nderstand how size() can impact the performance of splice() method in this =
std::list<T><br><br><div>4.We know our library couldn't make peop=
le very confused. That was=A0why we didn't define the operator[] in the=
std::list<>;<br>
</div><div>operator[] is not defined for std::list<T> not because of =
confusion and some other reason. Its not there because its not natural for =
std::list<T> and if someone would need this operator[], it would be t=
erribly slow as operator[] is natural for random iterator(std::vector<T&=
gt;).<br>
<br></div><div><br><br></div>5.The
function of this method can=A0be easily implied by programmers=20
themselves. We know this function had been defined clearly=A0in cpp11,=A0bu=
t
in the cpp98, its time-complexity is not defined clearly. For this=20
reason,=A0in the past we=A0almost didn't=A0use it. So =A0I think this c=
hange=20
won't make so many codes invalid.<br><br><div>If you are talking about =
the std::list<T>::size() time-complexity then i think its inline func=
tion and even it do not require the cost of a simple function call.<br>
<br><br></div><div>I agree with the Daniel comment that its there in the st=
andard since the inspection of STL library in C++. So no way it should be r=
emoved from the standard. <br><br><br></div><div>Alexander Stepenov and Bjr=
ane both advocate to use std::vector<T> instead of any other containe=
r unless you have very solid reason to do it otherwise. May be you should s=
tart thinking to use the std::vector<T> and should measure the perfor=
mance of your program.<br>
<br></div><div>Thanks<br></div><div>Mantosh Kumar<br></div><div><br><br><br=
></div><div class=3D"gmail_extra">=A0<br><div class=3D"gmail_quote">On Sat,=
Nov 9, 2013 at 10:03 PM, <span dir=3D"ltr"><<a href=3D"mailto:euloanty=
@live.com" target=3D"_blank">euloanty@live.com</a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>1.It makes most of the=
operations of=A0std::list slower;</div><div>2.std::forward_list don't =
have this method. This makes people very=A0confused.</div>
<div>3.the method=A0splice() becomes much slower.</div><div>4.We know our l=
ibrary couldn't make people very confused. That was=A0why we didn't=
define the operator[] in the std::list<>;</div><div>5.The function o=
f this method can=A0be easily implied by programmers themselves. We know th=
is function had been defined clearly=A0in cpp11,=A0but in the cpp98, its ti=
me-complexity is not defined clearly. For this reason,=A0in the past we=A0a=
lmost didn't=A0use it. So =A0I think this change won't make so many=
codes invalid.<br>
</div></div><div class=3D"HOEnZb"><div class=3D"h5">
<p></p>
-- <br>
=A0<br>
--- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org" target=3D=
"_blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--001a11c3e47cf2726204eac162a6--
.
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Sat, 9 Nov 2013 20:00:42 +0200
Raw View
--001a11c2b762059f9504eac2471d
Content-Type: text/plain; charset=ISO-8859-1
On 9 November 2013 18:33, <euloanty@live.com> wrote:
> 1.It makes most of the operations of std::list slower;
>
Well, "most" is debatable, and it makes many programs using std::list
faster,
in fact much faster.
> 2.std::forward_list don't have this method. This makes people
> very confused.
>
forward_list doesn't have it because it doesn't have the same complexity
guarantee for forward_list. Now that it's O(1) for std::list, containers
that
do have it have the same complexity guarantee for it.
> 3.the method splice() becomes much slower.
>
Yes, and the programs mentioned in my response to (1) become much faster.
4.We know our library couldn't make people very confused. That was why we
> didn't define the operator[] in the std::list<>;
>
I don't see why std::list::size makes anyone confused.
> 5.The function of this method can be easily implied by programmers
> themselves. We know this function had been defined clearly in cpp11, but in
> the cpp98, its time-complexity is not defined clearly. For this reason, in
> the past we almost didn't use it. So I think this change won't make so
> many codes invalid.
>
>
>
>
I don't see how a programmer can easily implement size(). Furthermore,
changing a function's
complexity from linear to constant breaks much fewer programs than removing
a function
completely.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
--001a11c2b762059f9504eac2471d
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><br><div class=3D"gmail=
_quote">On 9 November 2013 18:33, <span dir=3D"ltr"><<a href=3D"mailto:=
euloanty@live.com" target=3D"_blank">euloanty@live.com</a>></span> wrote=
:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-le=
ft:1px #ccc solid;padding-left:1ex">
<div dir=3D"ltr"><div>1.It makes most of the operations of=A0std::list slow=
er;</div></div></blockquote><div><br></div><div>Well, "most" is d=
ebatable, and it makes many programs using std::list faster,<br>in fact muc=
h faster.<br>
=A0<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;b=
order-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>2.std::fo=
rward_list don't have this method. This makes people very=A0confused.</=
div></div>
</blockquote><div><br></div><div>forward_list doesn't have it because i=
t doesn't have the same complexity<br></div><div>guarantee for forward_=
list. Now that it's O(1) for std::list, containers that<br>do have it h=
ave the same complexity guarantee for it.<br>
=A0<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;b=
order-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>3.the met=
hod=A0splice() becomes much slower.</div></div></blockquote><div><br></div>=
<div>Yes, and the programs mentioned in my response to (1) become much fast=
er.<br>
<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bord=
er-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>4.We know ou=
r library couldn't make people very confused. That was=A0why we didn=
9;t define the operator[] in the std::list<>;</div>
</div></blockquote><div><br></div><div>I don't see why std::list::size =
makes anyone confused.<br>=A0<br></div><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div =
dir=3D"ltr">
<div>5.The function of this method can=A0be easily implied by programmers t=
hemselves. We know this function had been defined clearly=A0in cpp11,=A0but=
in the cpp98, its time-complexity is not defined clearly. For this reason,=
=A0in the past we=A0almost didn't=A0use it. So =A0I think this change w=
on't make so many codes invalid.<br>
</div></div><div class=3D"HOEnZb"><div class=3D"h5">
<p></p>
<br><br></div></div></blockquote><div><br></div><div>I don't see how a =
programmer can easily implement size(). Furthermore, changing a function=
9;s<br>complexity from linear to constant breaks much fewer programs than r=
emoving a function<br>
completely. <br></div></div><br></div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--001a11c2b762059f9504eac2471d--
.
Author: "Billy O'Neal" <billy.oneal@gmail.com>
Date: Sat, 9 Nov 2013 10:00:58 -0800
Raw View
--e89a8ff1ce0257ee5d04eac24a1f
Content-Type: text/plain; charset=ISO-8859-1
I for one am strongly opposed to removing size. However I can answer some
of these questions:
> How std::list<T>::size() makes most of the operation slower? I mean i did
not get how a method (like inline size() )of the class can affect the other
operation.
It forces the std::list implementation to modify the size value in mutating
operations.
>Again i did not understand how size() can impact the performance of
splice() method in this std::list<T>
Splice between distinct lists can be O(1), but must be O(n) in the standard
because the number of elements spliced has to be counted to update size().
Billy O'Neal
https://github.com/BillyONeal/ <https://bitbucket.org/BillyONeal/>
http://stackoverflow.com/users/82320/billy-oneal
Malware Response Instructor - BleepingComputer.com
On Sat, Nov 9, 2013 at 8:56 AM, MANTOSH KUMAR <mantosh4u@gmail.com> wrote:
> Hi,
>
> Frankly Speaking i also did not understand your points regarding the
> removing the std::list<T>::size() method from the standard.
>
> However here is my opinion on your points:
>
>
> 1. It makes most of the operations of std::list slower.
> How std::list<T>::size() makes most of the operation slower? I mean i did
> not get how a method (like inline size() )of the class can affect the other
> operation.
>
> 2. std::forward_list don't have this method. This makes people
> very confused
> size() is not defined for this container class because purpose of
> std::forward_list is different and it should be used for very small or
> empty situation. And to optimize and to save one extra word of size of
> object of this class, it only store a single base pointer.
>
> 3.the method splice() becomes much slower.
> Again i did not understand how size() can impact the performance of
> splice() method in this std::list<T>
>
>
> 4.We know our library couldn't make people very confused. That was why we
> didn't define the operator[] in the std::list<>;
> operator[] is not defined for std::list<T> not because of confusion and
> some other reason. Its not there because its not natural for std::list<T>
> and if someone would need this operator[], it would be terribly slow as
> operator[] is natural for random iterator(std::vector<T>).
>
>
>
> 5.The function of this method can be easily implied by programmers
> themselves. We know this function had been defined clearly in cpp11, but in
> the cpp98, its time-complexity is not defined clearly. For this reason, in
> the past we almost didn't use it. So I think this change won't make so
> many codes invalid.
>
> If you are talking about the std::list<T>::size() time-complexity then i
> think its inline function and even it do not require the cost of a simple
> function call.
>
>
> I agree with the Daniel comment that its there in the standard since the
> inspection of STL library in C++. So no way it should be removed from the
> standard.
>
>
> Alexander Stepenov and Bjrane both advocate to use std::vector<T> instead
> of any other container unless you have very solid reason to do it
> otherwise. May be you should start thinking to use the std::vector<T> and
> should measure the performance of your program.
>
> Thanks
> Mantosh Kumar
>
>
>
>
> On Sat, Nov 9, 2013 at 10:03 PM, <euloanty@live.com> wrote:
>
>> 1.It makes most of the operations of std::list slower;
>> 2.std::forward_list don't have this method. This makes people
>> very confused.
>> 3.the method splice() becomes much slower.
>> 4.We know our library couldn't make people very confused. That was why we
>> didn't define the operator[] in the std::list<>;
>> 5.The function of this method can be easily implied by programmers
>> themselves. We know this function had been defined clearly in cpp11, but in
>> the cpp98, its time-complexity is not defined clearly. For this reason, in
>> the past we almost didn't use it. So I think this change won't make so
>> many codes invalid.
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to std-proposals+unsubscribe@isocpp.org.
>> To post to this group, send email to std-proposals@isocpp.org.
>> Visit this group at
>> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>>
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> Visit this group at
> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
--e89a8ff1ce0257ee5d04eac24a1f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>I for one am strongly opposed to removing size. Howev=
er I can answer some of these questions:</div><div>=A0</div><div>> How s=
td::list<T>::size() makes most of the operation slower? I mean i did =
not get how a method (like inline size() )of the class can affect the other=
operation.</div>
<div>=A0</div><div>It forces the std::list implementation to modify the siz=
e value in mutating operations.</div><div>=A0</div><div>>Again i did not=
understand how size() can impact the performance of splice() method in thi=
s std::list<T></div>
<div>=A0</div><div>Splice between distinct lists can be O(1), but must be O=
(n) in the standard because the number of elements spliced has to be counte=
d to update size().</div></div><div class=3D"gmail_extra"><br clear=3D"all"=
>
<div>
<div dir=3D"ltr"><div>Billy O'Neal</div><div><a href=3D"https://bitbuck=
et.org/BillyONeal/" target=3D"_blank">https://github.com/BillyONeal/</a></d=
iv><div><a href=3D"http://stackoverflow.com/users/82320/billy-oneal" target=
=3D"_blank">http://stackoverflow.com/users/82320/billy-oneal</a></div>
<div>Malware Response Instructor - BleepingComputer.com</div></div></div>
<br><br><div class=3D"gmail_quote">On Sat, Nov 9, 2013 at 8:56 AM, MANTOSH =
KUMAR <span dir=3D"ltr"><<a href=3D"mailto:mantosh4u@gmail.com" target=
=3D"_blank">mantosh4u@gmail.com</a>></span> wrote:<br><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex">
<div dir=3D"ltr"><div><div><div><div>Hi, <br><br></div><div>Frankly Speakin=
g i also did not understand your points regarding the removing the std::lis=
t<T>::size() method from the standard.<br><br></div><div>However here=
is my opinion on your points:<br>
<br></div><div><br>1. It makes most of the operations of=A0std::list slower=
..<br></div>How std::list<T>::size() makes most of the operation slowe=
r? I mean i did not get how a method (like inline size() )of the class can =
affect the other operation.<br>
<br></div>2. std::forward_list don't have this method. This makes peopl=
e very=A0confused<br></div>size() is not defined for this container class b=
ecause purpose of std::forward_list is different and it should be used for =
very small or empty situation. And to optimize and to save one extra word o=
f size of object of this class, it only store a single base pointer. <br>
<div class=3D"im">
<br>3.the method=A0splice() becomes much slower.<br></div></div>Again i did=
not understand how size() can impact the performance of splice() method in=
this std::list<T><div class=3D"im"><br><br><div>4.We know our librar=
y couldn't make people very confused. That was=A0why we didn't defi=
ne the operator[] in the std::list<>;<br>
</div></div><div>operator[] is not defined for std::list<T> not becau=
se of confusion and some other reason. Its not there because its not natura=
l for std::list<T> and if someone would need this operator[], it woul=
d be terribly slow as operator[] is natural for random iterator(std::vector=
<T>).<br>
<br></div><div class=3D"im"><div><br><br></div>5.The
function of this method can=A0be easily implied by programmers=20
themselves. We know this function had been defined clearly=A0in cpp11,=A0bu=
t
in the cpp98, its time-complexity is not defined clearly. For this=20
reason,=A0in the past we=A0almost didn't=A0use it. So =A0I think this c=
hange=20
won't make so many codes invalid.<br><br></div><div>If you are talking =
about the std::list<T>::size() time-complexity then i think its inlin=
e function and even it do not require the cost of a simple function call.<b=
r>
<br><br></div><div>I agree with the Daniel comment that its there in the st=
andard since the inspection of STL library in C++. So no way it should be r=
emoved from the standard. <br><br><br></div><div>Alexander Stepenov and Bjr=
ane both advocate to use std::vector<T> instead of any other containe=
r unless you have very solid reason to do it otherwise. May be you should s=
tart thinking to use the std::vector<T> and should measure the perfor=
mance of your program.<br>
<br></div><div>Thanks<span class=3D"HOEnZb"><font color=3D"#888888"><br></f=
ont></span></div><span class=3D"HOEnZb"><font color=3D"#888888"><div>Mantos=
h Kumar<br></div></font></span><div><div class=3D"h5"><div><br><br><br></di=
v><div class=3D"gmail_extra">
=A0<br><div class=3D"gmail_quote">On Sat, Nov 9, 2013 at 10:03 PM, <span d=
ir=3D"ltr"><<a href=3D"mailto:euloanty@live.com" target=3D"_blank">euloa=
nty@live.com</a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;padding=
-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-l=
eft-style:solid"><div dir=3D"ltr"><div>1.It makes most of the operations of=
=A0std::list slower;</div>
<div>2.std::forward_list don't have this method. This makes people very=
=A0confused.</div>
<div>3.the method=A0splice() becomes much slower.</div><div>4.We know our l=
ibrary couldn't make people very confused. That was=A0why we didn't=
define the operator[] in the std::list<>;</div><div>5.The function o=
f this method can=A0be easily implied by programmers themselves. We know th=
is function had been defined clearly=A0in cpp11,=A0but in the cpp98, its ti=
me-complexity is not defined clearly. For this reason,=A0in the past we=A0a=
lmost didn't=A0use it. So =A0I think this change won't make so many=
codes invalid.<br>
</div></div><div><div>
<p></p>
-- <br>
=A0<br>
--- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org" target=3D=
"_blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div></div></div></div><div class=3D"HO=
EnZb"><div class=3D"h5">
<p></p>
-- <br>
=A0<br>
--- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org" target=3D=
"_blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--e89a8ff1ce0257ee5d04eac24a1f--
.
Author: Howard Hinnant <howard.hinnant@gmail.com>
Date: Sat, 9 Nov 2013 14:53:47 -0500
Raw View
On Nov 9, 2013, at 11:33 AM, euloanty@live.com wrote:
> 1.It makes most of the operations of std::list slower;
> 2.std::forward_list don't have this method. This makes people very confus=
ed.
> 3.the method splice() becomes much slower.
> 4.We know our library couldn't make people very confused. That was why we=
didn't define the operator[] in the std::list<>;
> 5.The function of this method can be easily implied by programmers themse=
lves. We know this function had been defined clearly in cpp11, but in the c=
pp98, its time-complexity is not defined clearly. For this reason, in the p=
ast we almost didn't use it. So I think this change won't make so many cod=
es invalid.
We can't remove the size() member of list because it would break far too mu=
ch code.
Here is an old write up of mine, but explores some of the rationale as to h=
ow we got where we are today. It also includes a proposal for a new list::=
splice signature, that I still think is a good idea, but was firmly turned =
down by the LWG years ago. The new list::splice signature would allow the =
client to pass in the size of the spliced range (if known) which makes this=
splice function O(1). And every time I've needed to splice "some from oth=
er", there is an opportunity for the client to count the range being splice=
d as the range is being created, with negligible extra cost. I.e. creating=
the range to be spliced is nearly always an O(N) operation for the client.
http://home.roadrunner.com/~hinnant/On_list_size.html
Howard
--=20
---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
.
Author: =?UTF-8?Q?Klaim_=2D_Jo=C3=ABl_Lamotte?= <mjklaim@gmail.com>
Date: Sat, 9 Nov 2013 20:59:50 +0100
Raw View
--001a11c2903c100e6b04eac3f1ca
Content-Type: text/plain; charset=ISO-8859-1
By the way, let's say the proposal is about deprecating list::size(), would
it be a legitimate for deprecation according to how the commiteee works, or
would it be immediately be rejected without even discussion because it's
used a lot?
If I understand correctly, the committee "rules" (of thumb?) is that
proposing deprecation of anything would imply that a "better" alternative
is proposed too.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
--001a11c2903c100e6b04eac3f1ca
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_extra">By the way, let's say the p=
roposal is about deprecating list::size(), would it be a legitimate for dep=
recation according to how the commiteee works, or would it be immediately b=
e rejected without even discussion because it's used a lot?=A0</div>
<div class=3D"gmail_extra">If I understand correctly, the committee "r=
ules" (of thumb?) is that proposing deprecation of anything would impl=
y that a "better" alternative is proposed too.</div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--001a11c2903c100e6b04eac3f1ca--
.
Author: David Krauss <potswa@gmail.com>
Date: Sun, 10 Nov 2013 08:58:23 +0800
Raw View
On 11/10/13 12:01 AM, euloanty@live.com wrote:
> Could we remove the size() method in the std::list<T>?
> This method is too strange in the std::list<T>.
Strange or not, I'm kinda using that at the moment.
I'll let you know when I'm done with it.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
.
Author: Thiago Macieira <thiago@macieira.org>
Date: Sun, 10 Nov 2013 22:22:26 +0900
Raw View
On s=E1bado, 9 de novembro de 2013 20:59:50, Klaim - Jo=EBl Lamotte wrote:
> By the way, let's say the proposal is about deprecating list::size(), wou=
ld
> it be a legitimate for deprecation according to how the commiteee works, =
or
> would it be immediately be rejected without even discussion because it's
> used a lot?
> If I understand correctly, the committee "rules" (of thumb?) is that
> proposing deprecation of anything would imply that a "better" alternative
> is proposed too.
I'd say an exceptional case would be if the API is fundamentally flawed, it=
=20
should be deprecated anyway, even with no replacement.
For example, I'd argue that std::auto_ptr should have been deprecated even =
if=20
std::unique_ptr hadn't come along.
But all other cases we have in discussion today about deprecation are also=
=20
discussing alternatives (for example, std::vector<bool>).
--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
--=20
---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
.
Author: Daryle Walker <darylew@gmail.com>
Date: Sun, 10 Nov 2013 16:19:13 -0800 (PST)
Raw View
------=_Part_1979_22673077.1384129153365
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On Sunday, November 10, 2013 8:22:26 AM UTC-5, Thiago Macieira wrote:
>
> On s=E1bado, 9 de novembro de 2013 20:59:50, Klaim - Jo=EBl Lamotte wrote=
:=20
> > By the way, let's say the proposal is about deprecating list::size(),=
=20
> would=20
> > it be a legitimate for deprecation according to how the commiteee works=
,=20
> or=20
> > would it be immediately be rejected without even discussion because it'=
s=20
> > used a lot?=20
> > If I understand correctly, the committee "rules" (of thumb?) is that=20
> > proposing deprecation of anything would imply that a "better"=20
> alternative=20
> > is proposed too.=20
>
> I'd say an exceptional case would be if the API is fundamentally flawed,=
=20
> it=20
> should be deprecated anyway, even with no replacement.=20
>
> For example, I'd argue that std::auto_ptr should have been deprecated eve=
n=20
> if=20
> std::unique_ptr hadn't come along.=20
>
> But all other cases we have in discussion today about deprecation are als=
o=20
> discussing alternatives (for example, std::vector<bool>).=20
>
The std::strstream family of classes were depreciated with only half the=20
functionality replaced. (std::stringstream replaces dynamic memory needs,=
=20
but there's nothing for fixed memory needs. I'm planning to work on=20
that....)
Daryle W.
--=20
---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
------=_Part_1979_22673077.1384129153365
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Sunday, November 10, 2013 8:22:26 AM UTC-5, Thiago Maci=
eira wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left=
: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On s=E1bado, 9 de n=
ovembro de 2013 20:59:50, Klaim - Jo=EBl Lamotte wrote:
<br>> By the way, let's say the proposal is about deprecating list::size=
(), would
<br>> it be a legitimate for deprecation according to how the commiteee =
works, or
<br>> would it be immediately be rejected without even discussion becaus=
e it's
<br>> used a lot?
<br>> If I understand correctly, the committee "rules" (of thumb?) is th=
at
<br>> proposing deprecation of anything would imply that a "better" alte=
rnative
<br>> is proposed too.
<br>
<br>I'd say an exceptional case would be if the API is fundamentally flawed=
, it=20
<br>should be deprecated anyway, even with no replacement.
<br>
<br>For example, I'd argue that std::auto_ptr should have been deprecated e=
ven if=20
<br>std::unique_ptr hadn't come along.
<br>
<br>But all other cases we have in discussion today about deprecation are a=
lso=20
<br>discussing alternatives (for example, std::vector<bool>).
<br></blockquote><div><br>The <span style=3D"font-family: courier new,monos=
pace;">std::strstream</span> family of classes were depreciated with only h=
alf the functionality replaced. (<span style=3D"font-family: courier new,mo=
nospace;">std::stringstream</span> replaces dynamic memory needs, but there=
's nothing for fixed memory needs. I'm planning to work on that....)<br><br=
>Daryle W.<br><br></div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_1979_22673077.1384129153365--
.
Author: euloanty@live.com
Date: Mon, 11 Nov 2013 02:21:22 -0800 (PST)
Raw View
------=_Part_1521_32689189.1384165282445
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
I think the std::list<> should be used as the fastest efficiency just as=20
std::forward_list<>. We should use standard containers (not the c-style=20
array, c-style string) to develop all the programs including an operating=
=20
system. To calculate the size must bring more costs of time and space.
Counting the size is very easy for a programmer.
=20
list.push_back(3);
++listsize;
=20
list.pop_back(3);
--listsize;
=20
listsize+=3Dstd::difference(list2.begin()+3,list2.end());
list.splice(list2.begin()+3,list2.end()); // this operation is O(1), it is=
=20
very fast.
=20
From this, we could get, counting the size is not a must of a double-linked=
=20
list.
=20
I oppose that std::vector<> is always the first chosen container. In many=
=20
conditions, std::deque<> or std::forward_list<> is faster than a vector.
I know the Microsoft std::deque<> is slow. So I replace the it using this:
=20
// deque standard header
#pragma once
#include<boost\container\deque.hpp>
#ifndef BOOST_CONTAINER_DEQUE_HPP
#define BOOST_CONTAINER_DEQUE_HPP
#endif
#ifndef _DEQUE_
#define _DEQUE_
#endif
namespace std
{
using boost::container::deque;
}
=20
It is much faster than Microsoft std::deque.
=20
From my point, C++ is now the fastest language in the world. In fact, on=20
the average, it is faster than C, for C++ can do all things that C can do.
Of course, C is faster than Assembly. Assembly is faster than machine code.
=20
We should use them to develop the OS. So all these redundant operations=20
should be deprecated or we should provide a new container to do it, for=20
example:=93std::fast_list<>=94,=94std::nosize_list<>=94.
=20
=20
--=20
---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
------=_Part_1521_32689189.1384165282445
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><p class=3D"MsoNormal" align=3D"left" style=3D"line-height=
: 13.5pt; background-position: initial initial; background-repeat: initial =
initial;"><span lang=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Aria=
l, sans-serif; border: 1pt none windowtext; padding: 0cm;">I think the std:=
:list<> should be used
as the fastest efficiency just as std::forward_list<>. We should use
standard containers (not the c-style array, c-style string) to develop all =
the
programs including an operating system. To calculate the size must bring mo=
re
costs of time and space.</span><span lang=3D"EN-US" style=3D"font-size: 9.5=
pt; font-family: Arial, sans-serif;"><o:p></o:p></span></p><p class=3D"MsoN=
ormal" align=3D"left" style=3D"line-height: 13.5pt; background-position: in=
itial initial; background-repeat: initial initial;"><span lang=3D"EN-US" st=
yle=3D"font-size: 9.5pt; font-family: Arial, sans-serif; border: 1pt none w=
indowtext; padding: 0cm;">Counting the size is very easy for a
programmer.</span><span lang=3D"EN-US" style=3D"font-size: 9.5pt; font-fami=
ly: Arial, sans-serif;"><o:p></o:p></span></p><p class=3D"MsoNormal" align=
=3D"left" style=3D"line-height: 13.5pt; background-position: initial initia=
l; background-repeat: initial initial;"><span lang=3D"EN-US" style=3D"font-=
size: 9.5pt; font-family: Arial, sans-serif; border: 1pt none windowtext; p=
adding: 0cm;"> </span><span lang=3D"EN-US" style=3D"font-size: 9.5pt; =
font-family: Arial, sans-serif;"><o:p></o:p></span></p><p class=3D"MsoNorma=
l" align=3D"left" style=3D"text-indent: 4.75pt; line-height: 13.5pt; backgr=
ound-position: initial initial; background-repeat: initial initial;"><span =
lang=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, sans-serif; b=
order: 1pt none windowtext; padding: 0cm;">list.push_back(3);</span><span l=
ang=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, sans-serif;"><=
o:p></o:p></span></p><p class=3D"MsoNormal" align=3D"left" style=3D"text-in=
dent: 4.75pt; line-height: 13.5pt; background-position: initial initial; ba=
ckground-repeat: initial initial;"><span lang=3D"EN-US" style=3D"font-size:=
9.5pt; font-family: Arial, sans-serif; border: 1pt none windowtext; paddin=
g: 0cm;">++listsize;</span><span lang=3D"EN-US" style=3D"font-size: 9.5pt; =
font-family: Arial, sans-serif;"><o:p></o:p></span></p><p class=3D"MsoNorma=
l" align=3D"left" style=3D"text-indent: 4.75pt; line-height: 13.5pt; backgr=
ound-position: initial initial; background-repeat: initial initial;"><span =
lang=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, sans-serif; b=
order: 1pt none windowtext; padding: 0cm;"> </span><span lang=3D"EN-US=
" style=3D"font-size: 9.5pt; font-family: Arial, sans-serif;"><o:p></o:p></=
span></p><p class=3D"MsoNormal" align=3D"left" style=3D"text-indent: 4.75pt=
; line-height: 13.5pt; background-position: initial initial; background-rep=
eat: initial initial;"><span lang=3D"EN-US" style=3D"font-size: 9.5pt; font=
-family: Arial, sans-serif; border: 1pt none windowtext; padding: 0cm;">lis=
t.pop_back(3);</span><span lang=3D"EN-US" style=3D"font-size: 9.5pt; font-f=
amily: Arial, sans-serif;"><o:p></o:p></span></p><p class=3D"MsoNormal" ali=
gn=3D"left" style=3D"text-indent: 4.75pt; line-height: 13.5pt; background-p=
osition: initial initial; background-repeat: initial initial;"><span lang=
=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, sans-serif; borde=
r: 1pt none windowtext; padding: 0cm;">--listsize;</span><span lang=3D"EN-U=
S" style=3D"font-size: 9.5pt; font-family: Arial, sans-serif;"><o:p></o:p><=
/span></p><p class=3D"MsoNormal" align=3D"left" style=3D"text-indent: 4.75p=
t; line-height: 13.5pt; background-position: initial initial; background-re=
peat: initial initial;"><span lang=3D"EN-US" style=3D"font-size: 9.5pt; fon=
t-family: Arial, sans-serif; border: 1pt none windowtext; padding: 0cm;">&n=
bsp;</span><span lang=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Ari=
al, sans-serif;"><o:p></o:p></span></p><p class=3D"MsoNormal" align=3D"left=
" style=3D"margin-left: 5.25pt; text-indent: -5.25pt; line-height: 13.5pt; =
background-position: initial initial; background-repeat: initial initial;">=
<span lang=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, sans-se=
rif; border: 1pt none windowtext; padding: 0cm;"> listsize+=3Dst=
d::difference(list2.begin()+3,list2.end());</span><span lang=3D"EN-US" styl=
e=3D"font-size: 9.5pt; font-family: Arial, sans-serif;"><o:p></o:p></span><=
/p><p class=3D"MsoNormal" align=3D"left" style=3D"text-indent: 4.75pt; line=
-height: 13.5pt; background-position: initial initial; background-repeat: i=
nitial initial;"><span lang=3D"EN-US" style=3D"font-size: 9.5pt; font-famil=
y: Arial, sans-serif; border: 1pt none windowtext; padding: 0cm;">list.spli=
ce(list2.begin()+3,list2.end());
// this operation is O(1), it is very fast.</span><span lang=3D"EN-US" styl=
e=3D"font-size: 9.5pt; font-family: Arial, sans-serif;"><o:p></o:p></span><=
/p><p class=3D"MsoNormal" align=3D"left" style=3D"margin-left: 5.25pt; text=
-indent: -5.25pt; line-height: 13.5pt; background-position: initial initial=
; background-repeat: initial initial;"><span lang=3D"EN-US" style=3D"font-s=
ize: 9.5pt; font-family: Arial, sans-serif; border: 1pt none windowtext; pa=
dding: 0cm;"> </span><span lang=3D"EN-US" style=3D"font-size: 9.5pt; f=
ont-family: Arial, sans-serif;"><o:p></o:p></span></p><p class=3D"MsoNormal=
" align=3D"left" style=3D"margin-left: 5.25pt; text-indent: -5.25pt; line-h=
eight: 13.5pt; background-position: initial initial; background-repeat: ini=
tial initial;"><span lang=3D"EN-US" style=3D"font-size: 9.5pt; font-family:=
Arial, sans-serif; border: 1pt none windowtext; padding: 0cm;">From this, =
we could get, counting the size is not a must
of a double-linked list.</span><span lang=3D"EN-US" style=3D"font-size: 9.5=
pt; font-family: Arial, sans-serif;"><o:p></o:p></span></p><p class=3D"MsoN=
ormal" align=3D"left" style=3D"margin-left: 5.25pt; text-indent: -5.25pt; l=
ine-height: 13.5pt; background-position: initial initial; background-repeat=
: initial initial;"><span lang=3D"EN-US" style=3D"font-size: 9.5pt; font-fa=
mily: Arial, sans-serif; border: 1pt none windowtext; padding: 0cm;"> =
</span><span lang=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, =
sans-serif;"><o:p></o:p></span></p><p class=3D"MsoNormal" align=3D"left" st=
yle=3D"margin-left: 5.25pt; text-indent: -5.25pt; line-height: 13.5pt; back=
ground-position: initial initial; background-repeat: initial initial;"><spa=
n lang=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, sans-serif;=
border: 1pt none windowtext; padding: 0cm;">I oppose that std::vector<&=
gt; is always the first
chosen container. In many conditions, std::deque<> or
std::forward_list<> is faster than a vector.</span><span lang=3D"EN-U=
S" style=3D"font-size: 9.5pt; font-family: Arial, sans-serif;"><o:p></o:p><=
/span></p><p class=3D"MsoNormal" align=3D"left" style=3D"line-height: 13.5p=
t; background-position: initial initial; background-repeat: initial initial=
;"><span lang=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, sans=
-serif; border: 1pt none windowtext; padding: 0cm;">I know the Microsoft st=
d::deque<> is
slow. So I replace the it using this:</span><span lang=3D"EN-US" style=3D"f=
ont-size: 9.5pt; font-family: Arial, sans-serif;"><o:p></o:p></span></p><p =
class=3D"MsoNormal" align=3D"left" style=3D"line-height: 13.5pt; background=
-position: initial initial; background-repeat: initial initial;"><span lang=
=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, sans-serif; borde=
r: 1pt none windowtext; padding: 0cm;"> </span><span lang=3D"EN-US" st=
yle=3D"font-size: 9.5pt; font-family: Arial, sans-serif;"><o:p></o:p></span=
></p><p class=3D"MsoNormal" align=3D"left" style=3D"line-height: 13.5pt; ba=
ckground-position: initial initial; background-repeat: initial initial;"><s=
pan lang=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, sans-seri=
f; border: 1pt none windowtext; padding: 0cm;">// deque standard header</sp=
an><span lang=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, sans=
-serif;"><o:p></o:p></span></p><p class=3D"MsoNormal" align=3D"left" style=
=3D"line-height: 13.5pt; background-position: initial initial; background-r=
epeat: initial initial;"><span lang=3D"EN-US" style=3D"font-size: 9.5pt; fo=
nt-family: Arial, sans-serif; border: 1pt none windowtext; padding: 0cm;">#=
pragma once</span><span lang=3D"EN-US" style=3D"font-size: 9.5pt; font-fami=
ly: Arial, sans-serif;"><o:p></o:p></span></p><p class=3D"MsoNormal" align=
=3D"left" style=3D"line-height: 13.5pt; background-position: initial initia=
l; background-repeat: initial initial;"><span lang=3D"EN-US" style=3D"font-=
size: 9.5pt; font-family: Arial, sans-serif; border: 1pt none windowtext; p=
adding: 0cm;">#include<boost\container\deque.hpp></span><span lang=3D=
"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, sans-serif;"><o:p></=
o:p></span></p><p class=3D"MsoNormal" align=3D"left" style=3D"line-height: =
13.5pt; background-position: initial initial; background-repeat: initial in=
itial;"><span lang=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial,=
sans-serif; border: 1pt none windowtext; padding: 0cm;">#ifndef BOOST_CONT=
AINER_DEQUE_HPP</span><span lang=3D"EN-US" style=3D"font-size: 9.5pt; font-=
family: Arial, sans-serif;"><o:p></o:p></span></p><p class=3D"MsoNormal" al=
ign=3D"left" style=3D"line-height: 13.5pt; background-position: initial ini=
tial; background-repeat: initial initial;"><span lang=3D"EN-US" style=3D"fo=
nt-size: 9.5pt; font-family: Arial, sans-serif; border: 1pt none windowtext=
; padding: 0cm;">#define BOOST_CONTAINER_DEQUE_HPP</span><span lang=3D"EN-U=
S" style=3D"font-size: 9.5pt; font-family: Arial, sans-serif;"><o:p></o:p><=
/span></p><p class=3D"MsoNormal" align=3D"left" style=3D"line-height: 13.5p=
t; background-position: initial initial; background-repeat: initial initial=
;"><span lang=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, sans=
-serif; border: 1pt none windowtext; padding: 0cm;">#endif</span><span lang=
=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, sans-serif;"><o:p=
></o:p></span></p><p class=3D"MsoNormal" align=3D"left" style=3D"line-heigh=
t: 13.5pt; background-position: initial initial; background-repeat: initial=
initial;"><span lang=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Ari=
al, sans-serif; border: 1pt none windowtext; padding: 0cm;">#ifndef _DEQUE_=
</span><span lang=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, =
sans-serif;"><o:p></o:p></span></p><p class=3D"MsoNormal" align=3D"left" st=
yle=3D"line-height: 13.5pt; background-position: initial initial; backgroun=
d-repeat: initial initial;"><span lang=3D"EN-US" style=3D"font-size: 9.5pt;=
font-family: Arial, sans-serif; border: 1pt none windowtext; padding: 0cm;=
">#define _DEQUE_</span><span lang=3D"EN-US" style=3D"font-size: 9.5pt; fon=
t-family: Arial, sans-serif;"><o:p></o:p></span></p><p class=3D"MsoNormal" =
align=3D"left" style=3D"line-height: 13.5pt; background-position: initial i=
nitial; background-repeat: initial initial;"><span lang=3D"EN-US" style=3D"=
font-size: 9.5pt; font-family: Arial, sans-serif; border: 1pt none windowte=
xt; padding: 0cm;">#endif</span><span lang=3D"EN-US" style=3D"font-size: 9.=
5pt; font-family: Arial, sans-serif;"><o:p></o:p></span></p><p class=3D"Mso=
Normal" align=3D"left" style=3D"line-height: 13.5pt; background-position: i=
nitial initial; background-repeat: initial initial;"><span lang=3D"EN-US" s=
tyle=3D"font-size: 9.5pt; font-family: Arial, sans-serif; border: 1pt none =
windowtext; padding: 0cm;">namespace std</span><span lang=3D"EN-US" style=
=3D"font-size: 9.5pt; font-family: Arial, sans-serif;"><o:p></o:p></span></=
p><p class=3D"MsoNormal" align=3D"left" style=3D"line-height: 13.5pt; backg=
round-position: initial initial; background-repeat: initial initial;"><span=
lang=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, sans-serif; =
border: 1pt none windowtext; padding: 0cm;">{</span><span lang=3D"EN-US" st=
yle=3D"font-size: 9.5pt; font-family: Arial, sans-serif;"><o:p></o:p></span=
></p><p class=3D"MsoNormal" align=3D"left" style=3D"line-height: 13.5pt; ba=
ckground-position: initial initial; background-repeat: initial initial;"><s=
pan lang=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, sans-seri=
f; border: 1pt none windowtext; padding: 0cm;"> &nbs=
p; &=
nbsp; &nbs=
p; using
boost::container::deque;</span><span lang=3D"EN-US" style=3D"font-size: 9.5=
pt; font-family: Arial, sans-serif;"><o:p></o:p></span></p><p class=3D"MsoN=
ormal" align=3D"left" style=3D"line-height: 13.5pt; background-position: in=
itial initial; background-repeat: initial initial;"><span lang=3D"EN-US" st=
yle=3D"font-size: 9.5pt; font-family: Arial, sans-serif; border: 1pt none w=
indowtext; padding: 0cm;">}</span><span lang=3D"EN-US" style=3D"font-size: =
9.5pt; font-family: Arial, sans-serif;"><o:p></o:p></span></p><p class=3D"M=
soNormal" align=3D"left" style=3D"line-height: 13.5pt; background-position:=
initial initial; background-repeat: initial initial;"><span lang=3D"EN-US"=
style=3D"font-size: 9.5pt; font-family: Arial, sans-serif; border: 1pt non=
e windowtext; padding: 0cm;"> </span><span lang=3D"EN-US" style=3D"fon=
t-size: 9.5pt; font-family: Arial, sans-serif;"><o:p></o:p></span></p><p cl=
ass=3D"MsoNormal" align=3D"left" style=3D"line-height: 13.5pt; background-p=
osition: initial initial; background-repeat: initial initial;"><span lang=
=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, sans-serif; borde=
r: 1pt none windowtext; padding: 0cm;">It is much faster than Microsoft std=
::deque.</span><span lang=3D"EN-US" style=3D"font-size: 9.5pt; font-family:=
Arial, sans-serif;"><o:p></o:p></span></p><p class=3D"MsoNormal" align=3D"=
left" style=3D"line-height: 13.5pt; background-position: initial initial; b=
ackground-repeat: initial initial;"><span lang=3D"EN-US" style=3D"font-size=
: 9.5pt; font-family: Arial, sans-serif; border: 1pt none windowtext; paddi=
ng: 0cm;"> </span><span lang=3D"EN-US" style=3D"font-size: 9.5pt; font=
-family: Arial, sans-serif;"><o:p></o:p></span></p><p class=3D"MsoNormal" a=
lign=3D"left" style=3D"line-height: 13.5pt; background-position: initial in=
itial; background-repeat: initial initial;"><span lang=3D"EN-US" style=3D"f=
ont-size: 9.5pt; font-family: Arial, sans-serif; border: 1pt none windowtex=
t; padding: 0cm;">From my point, C++ is now the fastest
language in the world. In fact, on the average, it is faster than C, for C+=
+
can do all things that C can do.</span><span lang=3D"EN-US" style=3D"font-s=
ize: 9.5pt; font-family: Arial, sans-serif;"><o:p></o:p></span></p><p class=
=3D"MsoNormal" align=3D"left" style=3D"line-height: 13.5pt; background-posi=
tion: initial initial; background-repeat: initial initial;"><span lang=3D"E=
N-US" style=3D"font-size: 9.5pt; font-family: Arial, sans-serif; border: 1p=
t none windowtext; padding: 0cm;">Of course, C is faster than Assembly.
Assembly is faster than machine code.</span><span lang=3D"EN-US" style=3D"f=
ont-size: 9.5pt; font-family: Arial, sans-serif;"><o:p></o:p></span></p><p =
class=3D"MsoNormal" align=3D"left" style=3D"line-height: 13.5pt; background=
-position: initial initial; background-repeat: initial initial;"><span lang=
=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, sans-serif; borde=
r: 1pt none windowtext; padding: 0cm;"> </span><span lang=3D"EN-US" st=
yle=3D"font-size: 9.5pt; font-family: Arial, sans-serif;"><o:p></o:p></span=
></p><p class=3D"MsoNormal" align=3D"left" style=3D"line-height: 13.5pt; ba=
ckground-position: initial initial; background-repeat: initial initial;"><s=
pan lang=3D"EN-US" style=3D"font-size: 9.5pt; font-family: Arial, sans-seri=
f; border: 1pt none windowtext; padding: 0cm;">We should use them to develo=
p the OS. So all
these redundant operations should be deprecated or we should provide a new
container to do it, for example:=93std::fast_list<>=94,=94std::nosize=
_list<>=94.</span><span lang=3D"EN-US" style=3D"font-size: 9.5pt; fon=
t-family: Arial, sans-serif;"><o:p></o:p></span></p><p class=3D"MsoNormal" =
align=3D"left" style=3D"line-height: 13.5pt; background-position: initial i=
nitial; background-repeat: initial initial;"><span lang=3D"EN-US" style=3D"=
font-size: 9.5pt; font-family: Arial, sans-serif; border: 1pt none windowte=
xt; padding: 0cm;"> </span><span lang=3D"EN-US" style=3D"font-size: 9.=
5pt; font-family: Arial, sans-serif;"><o:p></o:p></span></p><p class=3D"Mso=
Normal">
</p><p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p=
></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_1521_32689189.1384165282445--
.
Author: euloanty@live.com
Date: Mon, 11 Nov 2013 02:41:35 -0800 (PST)
Raw View
------=_Part_1880_28669184.1384166495503
Content-Type: text/plain; charset=ISO-8859-1
> listsize+=std::difference(list2.begin()+3,list2.end());
>
> list.splice(list2.begin()+3,list2.end()); // this operation is O(1), it is
> very fast.
>
>
>
I am sorry that that is wrong.
This is right.......:
listsize+=std::difference(it,list2.end());
list.splice(it,list2.end()); // this operation is O(1), it is very fast.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
------=_Part_1880_28669184.1384166495503
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br><blockquote class=3D"gmail_quote" style=3D"margin:=
0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204=
); border-left-width: 1px; border-left-style: solid;"><div dir=3D"ltr"><p a=
lign=3D"left" class=3D"MsoNormal" style=3D"line-height: 13.5pt; text-indent=
: 4.75pt;"><br></p><p align=3D"left" class=3D"MsoNormal" style=3D"line-heig=
ht: 13.5pt; margin-left: 5.25pt;"><span lang=3D"EN-US" style=3D"padding: 0c=
m; border: 1pt windowtext; border-image: none; font-family: Arial,sans-seri=
f; font-size: 9.5pt;">listsize+=3Dstd::difference(<wbr>list2.begin()+3,list=
2.end());</span><span lang=3D"EN-US" style=3D"font-family: Arial,sans-serif=
; font-size: 9.5pt;"></span></p><p align=3D"left" class=3D"MsoNormal" style=
=3D"line-height: 13.5pt; text-indent: 4.75pt;"><span lang=3D"EN-US" style=
=3D"padding: 0cm; border: 1pt windowtext; border-image: none; font-family: =
Arial,sans-serif; font-size: 9.5pt;">list.splice(list2.begin()+3,<wbr>list2=
..end());
// this operation is O(1), it is very fast.</span><span lang=3D"EN-US" styl=
e=3D"font-family: Arial,sans-serif; font-size: 9.5pt;"></span></p><p align=
=3D"left" class=3D"MsoNormal" style=3D"line-height: 13.5pt; margin-left: 5.=
25pt;"><span lang=3D"EN-US" style=3D"padding: 0cm; border: 1pt windowtext; =
border-image: none; font-family: Arial,sans-serif; font-size: 9.5pt;"> =
;</span></p></div></blockquote><div><br></div><div>I am sorry that tha=
t is wrong.</div><div> </div><div>This is right.......:</div><p align=
=3D"left" class=3D"MsoNormal" style=3D"line-height: 13.5pt; margin-left: 5.=
25pt;"><span lang=3D"EN-US" style=3D"padding: 0cm; border: 1pt windowtext; =
border-image: none; font-family: Arial,sans-serif; font-size: 9.5pt;">lists=
ize+=3Dstd::difference(it,list2.end());</span><span lang=3D"EN-US" style=3D=
"font-family: Arial,sans-serif; font-size: 9.5pt;"></span></p><p align=3D"l=
eft" class=3D"MsoNormal" style=3D"line-height: 13.5pt; text-indent: 4.75pt;=
"><span lang=3D"EN-US" style=3D"padding: 0cm; border: 1pt windowtext; borde=
r-image: none; font-family: Arial,sans-serif; font-size: 9.5pt;">list.splic=
e(it,<wbr>list2.end()); // this operation is O(1), it is very fast.</span><=
/p><div><br></div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_1880_28669184.1384166495503--
.
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Mon, 11 Nov 2013 14:58:00 +0200
Raw View
On 11 November 2013 12:21, <euloanty@live.com> wrote:
> I think the std::list<> should be used as the fastest efficiency just as
> std::forward_list<>. We should use standard containers (not the c-style
> array, c-style string) to develop all the programs including an operating
> system. To calculate the size must bring more costs of time and space.
>
> Counting the size is very easy for a programmer.
>
>
>
> list.push_back(3);
>
> ++listsize;
>
>
>
> list.pop_back(3);
>
> --listsize;
And when you pass a list to a function, you want to always pass the size too?
Otherwise the function needs to do a linear operation to find the size.
You don't seem to listen to the explanations people have given, but
this deprecation/removal
will not happen. Proposing it is a waste of everybody's time, and
discussing it seems to be
too.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
.
Author: =?UTF-8?Q?Klaim_=2D_Jo=C3=ABl_Lamotte?= <mjklaim@gmail.com>
Date: Sat, 9 Nov 2013 17:03:45 +0100
Raw View
--001a11c20afcbf095604eac0a43d
Content-Type: text/plain; charset=ISO-8859-1
On Sat, Nov 9, 2013 at 5:01 PM, <euloanty@live.com> wrote:
> Could we remove the size() method in the std::list<T>?
> This method is too strange in the std::list<T>.
>
>
"Strange" is not what I would call a reason or a rationale for such a
change.
Would you mind describing precisely why you would want to remove size()
from this container?
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
--001a11c20afcbf095604eac0a43d
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><br><div class=3D"gmail=
_quote">On Sat, Nov 9, 2013 at 5:01 PM, <span dir=3D"ltr"><<a href=3D"m=
ailto:euloanty@live.com" target=3D"_blank">euloanty@live.com</a>></span>=
wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div style>Could we remove =
the size()=A0method in the std::list<T>?<br></div><div style><div>Thi=
s method is too strange in the std::list<T>.</div>
<span class=3D"HOEnZb"><font color=3D"#888888"><div><br></div></font></span=
></div></div></blockquote><div><br></div><div>"Strange" is not wh=
at I would call a reason or a rationale for such a change.<br>Would you min=
d describing precisely why you would want to remove size() from this contai=
ner?</div>
</div></div></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--001a11c20afcbf095604eac0a43d--
.