public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/26133]  New: unique_copy requires assignability when using output iterators
@ 2006-02-06 15:34 squell at alumina dot nl
  2006-02-06 15:36 ` [Bug libstdc++/26133] " squell at alumina dot nl
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: squell at alumina dot nl @ 2006-02-06 15:34 UTC (permalink / raw)
  To: gcc-bugs

unique_copy is overloaded on forward- and output_iterators for the result
iterator; the output_iterator version requires Assignability on the input's
value_type, which isn't required by the resolution to DR #241:

http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#241

I'll attach a demonstration, which compiles on at least one other
implementation. When using only input AND only output iterators,
implementations must keep a temporary copy somewhere; is the standard implying
that implementations use placement new for that?


-- 
           Summary: unique_copy requires assignability when using output
                    iterators
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: squell at alumina dot nl


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


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

* [Bug libstdc++/26133] unique_copy requires assignability when using output iterators
  2006-02-06 15:34 [Bug libstdc++/26133] New: unique_copy requires assignability when using output iterators squell at alumina dot nl
@ 2006-02-06 15:36 ` squell at alumina dot nl
  2006-02-08 10:09 ` pcarlini at suse dot de
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: squell at alumina dot nl @ 2006-02-06 15:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from squell at alumina dot nl  2006-02-06 15:36 -------
Created an attachment (id=10784)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10784&action=view)
Test case

Test case; the output should be "23".


-- 


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


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

* [Bug libstdc++/26133] unique_copy requires assignability when using output iterators
  2006-02-06 15:34 [Bug libstdc++/26133] New: unique_copy requires assignability when using output iterators squell at alumina dot nl
  2006-02-06 15:36 ` [Bug libstdc++/26133] " squell at alumina dot nl
@ 2006-02-08 10:09 ` pcarlini at suse dot de
  2006-02-08 21:52 ` paolo at gcc dot gnu dot org
  2006-02-08 21:53 ` pcarlini at suse dot de
  3 siblings, 0 replies; 5+ messages in thread
From: pcarlini at suse dot de @ 2006-02-08 10:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pcarlini at suse dot de  2006-02-08 10:09 -------
Working on it...


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pcarlini at suse dot de
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-02-08 10:09:28
               date|                            |


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


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

* [Bug libstdc++/26133] unique_copy requires assignability when using output iterators
  2006-02-06 15:34 [Bug libstdc++/26133] New: unique_copy requires assignability when using output iterators squell at alumina dot nl
  2006-02-06 15:36 ` [Bug libstdc++/26133] " squell at alumina dot nl
  2006-02-08 10:09 ` pcarlini at suse dot de
@ 2006-02-08 21:52 ` paolo at gcc dot gnu dot org
  2006-02-08 21:53 ` pcarlini at suse dot de
  3 siblings, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu dot org @ 2006-02-08 21:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from paolo at gcc dot gnu dot org  2006-02-08 21:52 -------
Subject: Bug 26133

Author: paolo
Date: Wed Feb  8 21:51:55 2006
New Revision: 110772

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110772
Log:
2006-02-08  Paolo Carlini  <pcarlini@suse.de>

        PR libstdc++/26133  (DR 241, [WP])
        * include/bits/stl_algo.h (__unique_copy(,,, forward_iterator_tag,
        output_iterator_tag), __unique_copy(,,, input_iterator_tag,
        output_iterator_tag), __unique_copy(,,, input_iterator_tag,
        forward_iterator_tag), and predicated counterparts): Add.
        (__unique_copy(,,, output_iterator_tag), __unique_copy(,,,
        forward_iterator_tag), and predicated counterparts): Remove.
        (unique_copy): Adjust, dispatch to the three helpers above.
        * testsuite/25_algorithms/unique_copy/2.cc: New.
        * testsuite/25_algorithms/unique_copy/26133.cc: Likewise.
        * testsuite/25_algorithms/unique_copy/3.cc: Likewise.   
        * docs/html/ext/howto.html: Add an entry for DR 241.

        * testsuite/25_algorithms/unique_copy/1.cc: Minor cosmetic changes.

Added:
    trunk/libstdc++-v3/testsuite/25_algorithms/unique_copy/2.cc
    trunk/libstdc++-v3/testsuite/25_algorithms/unique_copy/26133.cc
    trunk/libstdc++-v3/testsuite/25_algorithms/unique_copy/3.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/docs/html/ext/howto.html
    trunk/libstdc++-v3/include/bits/stl_algo.h
    trunk/libstdc++-v3/testsuite/25_algorithms/unique_copy/1.cc


-- 


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


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

* [Bug libstdc++/26133] unique_copy requires assignability when using output iterators
  2006-02-06 15:34 [Bug libstdc++/26133] New: unique_copy requires assignability when using output iterators squell at alumina dot nl
                   ` (2 preceding siblings ...)
  2006-02-08 21:52 ` paolo at gcc dot gnu dot org
@ 2006-02-08 21:53 ` pcarlini at suse dot de
  3 siblings, 0 replies; 5+ messages in thread
From: pcarlini at suse dot de @ 2006-02-08 21:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pcarlini at suse dot de  2006-02-08 21:53 -------
Fixed for 4.2.0.


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.2.0


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


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

end of thread, other threads:[~2006-02-08 21:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-06 15:34 [Bug libstdc++/26133] New: unique_copy requires assignability when using output iterators squell at alumina dot nl
2006-02-06 15:36 ` [Bug libstdc++/26133] " squell at alumina dot nl
2006-02-08 10:09 ` pcarlini at suse dot de
2006-02-08 21:52 ` paolo at gcc dot gnu dot org
2006-02-08 21:53 ` pcarlini at suse dot de

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