Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, some of it is great and the ability to write

    for (const auto& item: collection) {
is probably my favorite feature of C++11. Ironically it makes the recommended approach of using standard algorithms with lambdas look abstruse in comparison. Considering your example, I still feel that inheriting from boost::noncopyable is the cleanest way to declare the class noncopyable. It feels almost like a language keyword!

But the amount of new gotchas is significant too. In particular to use move semantics effectively you have to be aware of such obscure things as xvalues, std::move_if_noexcept and rules for autogenerated move constructors. The fact that the committee itself did not get it right on the first try speaks for itself.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: