public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/42573]  New: shrink_to_fit() missing
@ 2010-01-01 16:05 nico at josuttis dot de
  2010-01-01 17:08 ` [Bug libstdc++/42573] " paolo dot carlini at oracle dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: nico at josuttis dot de @ 2010-01-01 16:05 UTC (permalink / raw)
  To: gcc-bugs

For vector<>, deque<>, and string<>
the new member function shrink_to_fit()
is missing.


-- 
           Summary: shrink_to_fit() missing
           Product: gcc
           Version: 4.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nico at josuttis dot de
 GCC build triplet: -std=c++0x


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug libstdc++/42573] shrink_to_fit() missing
  2010-01-01 16:05 [Bug libstdc++/42573] New: shrink_to_fit() missing nico at josuttis dot de
@ 2010-01-01 17:08 ` paolo dot carlini at oracle dot com
  2010-01-07 16:42 ` [Bug libstdc++/42573] [C++0x] " paolo dot carlini at oracle dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-01-01 17:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from paolo dot carlini at oracle dot com  2010-01-01 17:08 -------
Yeah, *a lot* of C++0x things are missing, or still incorrectly implemented, in
general we are not tracking in Bugzilla each!


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|nico at josuttis dot de     |
             Status|UNCONFIRMED                 |RESOLVED
  GCC build triplet|-std=c++0x                  |
         Resolution|                            |INVALID


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug libstdc++/42573] [C++0x] shrink_to_fit() missing
  2010-01-01 16:05 [Bug libstdc++/42573] New: shrink_to_fit() missing nico at josuttis dot de
  2010-01-01 17:08 ` [Bug libstdc++/42573] " paolo dot carlini at oracle dot com
  2010-01-07 16:42 ` [Bug libstdc++/42573] [C++0x] " paolo dot carlini at oracle dot com
@ 2010-01-07 16:42 ` paolo dot carlini at oracle dot com
  2010-01-07 23:18 ` paolo dot carlini at oracle dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-01-07 16:42 UTC (permalink / raw)
  To: gcc-bugs



-- 

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|0000-00-00 00:00:00         |2010-01-07 16:42:32
               date|                            |


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug libstdc++/42573] [C++0x] shrink_to_fit() missing
  2010-01-01 16:05 [Bug libstdc++/42573] New: shrink_to_fit() missing nico at josuttis dot de
  2010-01-01 17:08 ` [Bug libstdc++/42573] " paolo dot carlini at oracle dot com
@ 2010-01-07 16:42 ` paolo dot carlini at oracle dot com
  2010-01-07 16:42 ` paolo dot carlini at oracle dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-01-07 16:42 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug libstdc++/42573] [C++0x] shrink_to_fit() missing
  2010-01-01 16:05 [Bug libstdc++/42573] New: shrink_to_fit() missing nico at josuttis dot de
                   ` (2 preceding siblings ...)
  2010-01-07 16:42 ` paolo dot carlini at oracle dot com
@ 2010-01-07 23:18 ` paolo dot carlini at oracle dot com
  2010-01-08 10:05 ` jwakely dot gcc at gmail dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-01-07 23:18 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug libstdc++/42573] [C++0x] shrink_to_fit() missing
  2010-01-01 16:05 [Bug libstdc++/42573] New: shrink_to_fit() missing nico at josuttis dot de
                   ` (3 preceding siblings ...)
  2010-01-07 23:18 ` paolo dot carlini at oracle dot com
@ 2010-01-08 10:05 ` jwakely dot gcc at gmail dot com
  2010-01-08 10:29 ` paolo dot carlini at oracle dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jwakely dot gcc at gmail dot com @ 2010-01-08 10:05 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug libstdc++/42573] [C++0x] shrink_to_fit() missing
  2010-01-01 16:05 [Bug libstdc++/42573] New: shrink_to_fit() missing nico at josuttis dot de
                   ` (4 preceding siblings ...)
  2010-01-08 10:05 ` jwakely dot gcc at gmail dot com
@ 2010-01-08 10:29 ` paolo dot carlini at oracle dot com
  2010-01-08 10:46 ` paolo dot carlini at oracle dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-01-08 10:29 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug libstdc++/42573] [C++0x] shrink_to_fit() missing
  2010-01-01 16:05 [Bug libstdc++/42573] New: shrink_to_fit() missing nico at josuttis dot de
                   ` (5 preceding siblings ...)
  2010-01-08 10:29 ` paolo dot carlini at oracle dot com
@ 2010-01-08 10:46 ` paolo dot carlini at oracle dot com
  2010-01-08 13:01 ` paolo at gcc dot gnu dot org
  2010-01-08 13:06 ` paolo dot carlini at oracle dot com
  8 siblings, 0 replies; 10+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-01-08 10:46 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug libstdc++/42573] [C++0x] shrink_to_fit() missing
  2010-01-01 16:05 [Bug libstdc++/42573] New: shrink_to_fit() missing nico at josuttis dot de
                   ` (6 preceding siblings ...)
  2010-01-08 10:46 ` paolo dot carlini at oracle dot com
@ 2010-01-08 13:01 ` paolo at gcc dot gnu dot org
  2010-01-08 13:06 ` paolo dot carlini at oracle dot com
  8 siblings, 0 replies; 10+ messages in thread
From: paolo at gcc dot gnu dot org @ 2010-01-08 13:01 UTC (permalink / raw)
  To: gcc-bugs



------- 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=gcc&view=rev&rev=155733
Log:
2010-01-08  Paolo Carlini  <paolo.carlini@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 (vector<bool>::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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug libstdc++/42573] [C++0x] shrink_to_fit() missing
  2010-01-01 16:05 [Bug libstdc++/42573] New: shrink_to_fit() missing nico at josuttis dot de
                   ` (7 preceding siblings ...)
  2010-01-08 13:01 ` paolo at gcc dot gnu dot org
@ 2010-01-08 13:06 ` paolo dot carlini at oracle dot com
  8 siblings, 0 replies; 10+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-01-08 13:06 UTC (permalink / raw)
  To: gcc-bugs



------- 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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-01-08 13:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-01 16:05 [Bug libstdc++/42573] New: shrink_to_fit() missing nico at josuttis dot de
2010-01-01 17:08 ` [Bug libstdc++/42573] " paolo dot carlini at oracle dot com
2010-01-07 16:42 ` [Bug libstdc++/42573] [C++0x] " paolo dot carlini at oracle dot com
2010-01-07 16:42 ` paolo dot carlini at oracle dot com
2010-01-07 23:18 ` paolo dot carlini at oracle dot com
2010-01-08 10:05 ` jwakely dot gcc at gmail dot com
2010-01-08 10:29 ` paolo dot carlini at oracle dot com
2010-01-08 10:46 ` paolo dot carlini at oracle dot com
2010-01-08 13:01 ` paolo at gcc dot gnu dot org
2010-01-08 13:06 ` paolo dot carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).