Which Effective C++ Items can be implemented better via C++11? How? -


since book effective c++ seems still worth reading , the best start effective c++ series, wonder suggested solutions/implementations need not understand in detail/memorize because there better solutions in c++11 or later. so:

which effective c++ items can implemented simpler or better via c++11 or later? how can implemented now, , in way better?


details:

since there many c++ idioms deprecated in c++11, guess influences solutions in effective c++ book. example, looking @ its table of contents, guess (since have not yet read book)

  • item 6 (explicitly disallow use of compiler-generated functions not want) becomes simpler via =delete
  • item 17 (store newed objects in smart pointers in standalone statements) becomes simpler via make_shared (and c++14's make_unique)
  • item 21 (don't try return reference when must return object) becomes simpler , more efficient via move semantics
  • item 55 (familiarize boost) has fewer examples because many boost features part of c++11 or later.

correct? more? how these items implemented in modern c++?

many recipes effective c++ still apply c++11. way, effecive modern c++ focuses on c++11 changes.

the question broad, comes mind:

5) still true, don't forget move constructor , assignment.
6) still true, easier, explained
13) principle still true forget auto_ptr , used shared_ptr , unique_ptr
14) still true, simplified shared_ptr.
17) still true, easier, explained
18) still true, prefer enum classes enums.
54) still applies, new libraries
55) still true, although more boost features in standard

many examples simplified, using auto or range for


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -