Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #19134
| From | Luca Risolia <luca.risolia@studio.unibo.it> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Apparently genuine code gives compilation errors |
| Date | 2012-10-20 21:18 +0200 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <k5uteo$89s$2@speranza.aioe.org> (permalink) |
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.
Back to comp.lang.c++ | Previous | Next — Next in thread | Find similar | Unroll thread
Apparently genuine code gives compilation errors Luca Risolia <luca.risolia@studio.unibo.it> - 2012-10-20 21:18 +0200 Re: Apparently genuine code gives compilation errors Marc <marc.glisse@gmail.com> - 2012-10-20 20:06 +0000
csiph-web