[Bug libstdc++/42573] [C++0x] shrink_to_fit() missing

2010-01-08 Thread jwakely dot gcc at gmail dot com


--- Comment #4 from jwakely dot gcc at gmail dot com  2010-01-08 10:05 
---
It would be conforming to add the function with an empty body ;)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42573



[Bug libstdc++/42573] [C++0x] shrink_to_fit() missing

2010-01-08 Thread paolo dot carlini at oracle dot com


--- Comment #5 from paolo dot carlini at oracle dot com  2010-01-08 10:29 
---
Good joke and also good point Jon: I still believe that our C++0x user
interfaces, even not considering the semantics, aren't yet such complete and
otherwise perfect to grant that action, but all in all, if somebody wants to
add the empty bodies with a BIG TODO comment in the code, I do not object...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42573



[Bug libstdc++/42573] [C++0x] shrink_to_fit() missing

2010-01-08 Thread paolo dot carlini at oracle dot com


--- Comment #6 from paolo dot carlini at oracle dot com  2010-01-08 10:46 
---
Ok, Jon, you convinced me: I'll add the interfaces, and a very, very basic
implementation for vector and deque for now, I think just do something for PODs
(reminder to ourselves, change the dispatches in unitialized_* functions, etc,
to use to most strict yet correct traits)


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42573



[Bug libstdc++/42573] [C++0x] shrink_to_fit() missing

2010-01-08 Thread paolo at gcc dot gnu dot org


--- Comment #7 from paolo at gcc dot gnu dot org  2010-01-08 13:01 ---
Subject: Bug 42573

Author: paolo
Date: Fri Jan  8 13:01:24 2010
New Revision: 155733

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=155733
Log:
2010-01-08  Paolo Carlini  paolo.carl...@oracle.com

PR libstdc++/42573
* include/bits/allocator.h (struct __shrink_to_fit): Add.
* include/bits/stl_deque.h (deque::shrink_to_fit): Add.
* include/bits/stl_vector.h (vector::shrink_to_fit): Likewise.
* include/bits/stl_bvector.h (vectorbool::shrink_to_fit): Likewise.
* include/bits/basic_string.h (basic_string::shrink_to_fit):
Likewise.
* include/ext/vstring.h (__versa_string::shrink_to_fit): Likewise.
* include/debug/deque: Add corresponding using declaration.
* include/debug/vector: Likewise.
* include/debug/string: Likewise.
* include/profile/deque: Likewise.
* include/profile/vector: Likewise.
* config/abi/pre/gnu.ver: Export new symbols.
* testsuite/23_containers/deque/capacity/shrink_to_fit.cc: New.
* testsuite/23_containers/vector/capacity/shrink_to_fit.cc: Likewise.
* testsuite/21_strings/basic_string/capacity/char/shrink_to_fit.cc:
Likewise.
* testsuite/21_strings/basic_string/capacity/wchar_t/shrink_to_fit.cc:
Likewise.
* testsuite/ext/vstring/capacity/shrink_to_fit.cc: Likewise.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
Adjust dg-error line number.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
Likewise.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
Adjust dg-error line number.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
Likewise.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Likewise.

Added:
   
trunk/libstdc++-v3/testsuite/21_strings/basic_string/capacity/char/shrink_to_fit.cc
   
trunk/libstdc++-v3/testsuite/21_strings/basic_string/capacity/wchar_t/shrink_to_fit.cc
trunk/libstdc++-v3/testsuite/23_containers/deque/capacity/shrink_to_fit.cc
trunk/libstdc++-v3/testsuite/23_containers/vector/capacity/shrink_to_fit.cc
trunk/libstdc++-v3/testsuite/ext/vstring/capacity/shrink_to_fit.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/config/abi/pre/gnu.ver
trunk/libstdc++-v3/include/bits/allocator.h
trunk/libstdc++-v3/include/bits/basic_string.h
trunk/libstdc++-v3/include/bits/stl_bvector.h
trunk/libstdc++-v3/include/bits/stl_deque.h
trunk/libstdc++-v3/include/bits/stl_vector.h
trunk/libstdc++-v3/include/debug/deque
trunk/libstdc++-v3/include/debug/string
trunk/libstdc++-v3/include/debug/vector
trunk/libstdc++-v3/include/ext/vstring.h
trunk/libstdc++-v3/include/profile/deque
trunk/libstdc++-v3/include/profile/vector
   
trunk/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc
   
trunk/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc
   
trunk/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc
   
trunk/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc
   
trunk/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc
   
trunk/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc
   
trunk/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc
   
trunk/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42573



[Bug libstdc++/42573] [C++0x] shrink_to_fit() missing

2010-01-08 Thread paolo dot carlini at oracle dot com


--- Comment #8 from paolo dot carlini at oracle dot com  2010-01-08 13:06 
---
Done (within the limits explained in the audit trail).


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.5.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42573



[Bug libstdc++/42573] [C++0x] shrink_to_fit() missing

2010-01-07 Thread paolo dot carlini at oracle dot com


--- Comment #2 from paolo dot carlini at oracle dot com  2010-01-07 16:42 
---
Ok, let's re-open this and add the basic implementation in time for gcc4.5
(C++0x mode only of course).


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|INVALID |
Summary|shrink_to_fit() missing |[C++0x] shrink_to_fit()
   ||missing


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42573



[Bug libstdc++/42573] [C++0x] shrink_to_fit() missing

2010-01-07 Thread paolo dot carlini at oracle dot com


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |paolo dot carlini at oracle
   |dot org |dot com
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-01-07 16:42:32
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42573



[Bug libstdc++/42573] [C++0x] shrink_to_fit() missing

2010-01-07 Thread paolo dot carlini at oracle dot com


--- Comment #3 from paolo dot carlini at oracle dot com  2010-01-07 23:17 
---
Nope... I went through this and came to the conclusion that a fairly good
implementation has to wait for a complete resolution of N2983: the request is
non-binding thus if the move constructor can throw and the type T isn't
CopyConstructible the implementation should not do anything. Given the
subtleties wrt throwing move constructors recently surfaced, I think we'll add
this member in due course, in any case *after* having tweaked the internals of
the std containers for the other traditional member functions...


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42573