[ https://issues.apache.org/jira/browse/STDCXX-171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Sebor closed STDCXX-171. ------------------------------- Resolution: Invalid Fix Version/s: (was: 4.2.2) As Farid says, the test case is invalid due to LWG issue #[538 | http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#538]. > [LWG #538] std::unique_copy() requires CopyConstructible and Assignable > ----------------------------------------------------------------------- > > Key: STDCXX-171 > URL: https://issues.apache.org/jira/browse/STDCXX-171 > Project: C++ Standard Library > Issue Type: Bug > Components: 25. Algorithms > Affects Versions: 4.1.3 > Environment: all > Reporter: Anton Pevtsov > Priority: Minor > Original Estimate: 2h > Remaining Estimate: 2h > > 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. - You can reply to this email to add a comment to the issue online.