stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Pevtsov (JIRA)" <j...@apache.org>
Subject [jira] Created: (STDCXX-171) unique_copy algorithm requires CopyConstructible and Assignable
Date Mon, 10 Apr 2006 13:14:00 GMT
unique_copy algorithm requires CopyConstructible and Assignable
---------------------------------------------------------------

         Key: STDCXX-171
         URL: http://issues.apache.org/jira/browse/STDCXX-171
     Project: C++ Standard Library
        Type: Bug

  Components: 25. Algorithms  
    Versions: 4.1.3    
 Environment: all
    Reporter: Anton Pevtsov
    Priority: Minor


The following test fails to compile:

#include <algorithm>
#include <iterator>
#include <iostream>

struct no_assign {
    int const x;
    no_assign() : x(23) { }
    operator int() const { return x; }
};

 // this program should output a single "23".

int main()
{
    no_assign in[4];
    std::unique_copy(in, in+4, std::ostream_iterator<int>(std::cout, "\n"));
}

The unique_copy standard requirements are still discussed:
http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#241
http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#538


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message