L
Luca Risolia
Hello,
does the following block of code compiles for you?
{
// The following does compile with std::vector, std::map, etc..
typedef std::set<std::string> Container;
Container c;
std::for_each(std::make_move_iterator(c.begin()),
std::make_move_iterator(c.end()),
[](const Container::value_type &) {}); // or &&
}
I get compiler errors from both clang and g++ 4.7 in the only case
Container is std::set.
I will omit the error from the compiler, since I suspect it's a bug in
the implementation I am using, but I would like to have your opinions
based on the source code purely, since I do not see anything wrong.
does the following block of code compiles for you?
{
// The following does compile with std::vector, std::map, etc..
typedef std::set<std::string> Container;
Container c;
std::for_each(std::make_move_iterator(c.begin()),
std::make_move_iterator(c.end()),
[](const Container::value_type &) {}); // or &&
}
I get compiler errors from both clang and g++ 4.7 in the only case
Container is std::set.
I will omit the error from the compiler, since I suspect it's a bug in
the implementation I am using, but I would like to have your opinions
based on the source code purely, since I do not see anything wrong.