id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 9515,[range] uniqued adaptor (and hence adjacent_filtered) returns wrong elements,Eric Niebler,Neil Groves,"The following shows the difference between the `boost::range::unique_copy` algorithm and the `boost::adaptors::unique` adaptor. {{{ #include #include #include #include #include #include #include #include struct istring { char const *c_str; istring(char const *s) : c_str(s) {} bool operator==(istring u) const { return boost::iequals(c_str, u.c_str); } friend std::ostream& operator<<(std::ostream& sout, istring s) { return sout << s.c_str; } }; int main() { std::vector strs; strs.push_back(istring(""hello"")); strs.push_back(istring(""HELLO"")); std::cout << ""boost.range: \n""; boost::range::copy( boost::adaptors::unique(strs), std::ostream_iterator(std::cout)); std::cout << ""\n""; std::cout << ""std algo: \n""; boost::range::unique_copy(strs, std::ostream_iterator(std::cout)); std::cout << ""\n""; } }}} This prints: {{{ boost.range: HELLO std algo: hello }}} `std::unique` and `std::unique_copy` yield the *first* element in a sequence of equivalent elements. The Boost adaptor yields the last. This is an important and observable difference. Since `uniqued` is implemented in terms of `adjacent_filtered`, the problem needs to be fixed there. ",Bugs,closed,To Be Determined,range,Boost 1.54.0,Problem,fixed,,