• Complain

Nicolai M. Josuttis - C++ Move Semantics - The Complete Guide

Here you can read online Nicolai M. Josuttis - C++ Move Semantics - The Complete Guide full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2020, publisher: leanpub.com, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

No cover
  • Book:
    C++ Move Semantics - The Complete Guide
  • Author:
  • Publisher:
    leanpub.com
  • Genre:
  • Year:
    2020
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

C++ Move Semantics - The Complete Guide: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "C++ Move Semantics - The Complete Guide" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Nicolai M. Josuttis: author's other books


Who wrote C++ Move Semantics - The Complete Guide? Find out the surname, the name of the author of the book and a list of all author's works by series.

C++ Move Semantics - The Complete Guide — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "C++ Move Semantics - The Complete Guide" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
C Move Semantics - The Complete Guide Nicolai M Josuttis This book is for - photo 1
C++ Move Semantics - The Complete Guide
Nicolai M. Josuttis

This book is for sale at http://leanpub.com/cppmove

This version was published on 2020-12-19

This is a Leanpub book Leanpub empowers authors and publishers with - photo 2

* * * * *

This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do.

* * * * *

2019 - 2020 Nicolai M. Josuttis

Black Lives Matter

Preface

Move semantics, introduced with C++11, has become a hallmark of modern C++ programming.However, it also complicates the language in many ways.Even after several years of support, experienced programmers strugglewith all the details of move semantics,style guides still recommend different consequences for programmingeven of trivial classes, andwe still discuss semantic details in the C++ standards committee.

Whenever I have taught what I have learned about C++ move semantics so far,I have said, Somebody has to write a book about all this,and the usual answer was: Yes, please do!So, I finally did.

As always when writing a book about C++,I was surprised about the number of aspects to be taught,the situations to be clarified, and the consequences to be described.It really was time to write a book aboutall aspects of move semantics, covering all C++ versionsfrom C++11 up to C++20.I learned a lot and I am sure you will too.

An Experiment

This book is an experiment in two ways:

  • I am writing an in-depth book covering a complex core language feature without the direct help of a core language expert as a co-author. However, I can ask questions and I do.
  • I am publishing the book myself on Leanpub and for printing on demand. That is, this book is written step by step and I will publish new versions as soon there is a significant improvement that makes the publication of a new version worthwhile.

The good thing is:

  • You get the view of the language features from an experienced application programmersomebody who feels the pain a feature might cause and asks the relevant questions to be able to motivate and explain the design and its consequences for programming in practice.
  • You can benefit from my experience with move semantics while I am still writing.
  • This book and all readers can benefit from your early feedback.

This means that you are also part of the experiment.So help me out:give about flaws, errors,features that are not explained well, or gaps,so that we all can benefit from these improvements.

Versions of This Book

Because this book is written incrementally,the following is a history of the major updates(newest first):

  • 2020-10-27: Several fixes (see errata)
  • 2020-09-18: Using lambdas with template parameters (since C++20)
  • 2020-09-15: Fix a bug with full specializations of universal references
  • 2020-09-12: std::move() for data members
  • 2020-09-10: Fixing deferred perfect returning
  • 2020-09-09: Proof reading done and final fixes to go into print
  • 2020-09-06: Helper trait is_nothrow_movable for abstract base classes
  • 2020-09-06: Value category of (references to) functions
  • 2020-09-05: Clarifications on auto&& including using it in C++20 functions
  • 2020-08-29: Move assignments of objects to themselves
  • 2020-08-28: Move semantics for std::pair<>, std::optional<>, threads, etc.
  • 2020-08-28: Unique pointers, IOStreams, and other move-only types
  • 2020-08-26: Several clarifications about universal references
  • 2020-08-25: Using std::move() when calling member functions
  • 2020-08-20: New chapter about move-only types
  • 2020-08-19: Discussion of noexcept details
  • 2020-08-18: New chapter about moving algorithms and iterators
  • 2020-08-10: Description of move semantics for shared pointers
  • 2020-08-10: Motivation for the reuse of moved-from objects and clarification of move assignments of objects to themselves
  • 2020-08-09: Recommendation not to return by value with const
  • 2020-07-27: Move semantics for strings and containers
  • 2020-07-24: General remarks on using reference qualifiers
  • 2020-07-23: Description of details of type deduction of universal references and reference collapsing for perfect forwarding
  • 2020-07-07: Description of perfect returning for lambdas
  • 2020-06-21: New chapter about perfect returning (with small fixes for perfect forwarding)
  • 2020-06-12: Improvements of the chapter about invalid states
  • 2020-06-08: New chapter about using noexcept
  • 2020-06-06: Improvements of the chapter about invalid states
  • 2020-05-03: Fixing of move semantics in class hierarchies
  • 2020-04-29: Fixing of move semantics for classes and invalid states after review
  • 2020-04-25: Fixing of code layout and missing figures in non-PDF versions
  • 2020-04-22: New chapter about moved-from states
  • 2020-04-13: Discussion of when you cannot avoid using std::move()
  • 2020-02-01: Discussion of when automatically generated move operations are broken
  • 2020-01-19: Constructors with universal references
  • 2020-01-04: The initial published version of the book
Acknowledgments

First of all, I would like to thank you, the C++ community,for making this book possible.The incredible design of all the features of move semantics, thehelpful feedback, and their curiosity are thebasis for the evolution of a successful language.In particular, thanks for all the issues youtold me about and explained and for the feedback you gave.

I would especially like to thank everyone who reviewed drafts of this bookor corresponding slidesand provided valuable feedback and clarification.These reviews increased the quality of the book significantly,again proving that good things need theinput of many wise guys.Therefore, so far (this list is still growing)huge thanks toJavier Estrada,Howard Hinnant,Klaus Iglberger,Daniel Krgler,Marc Mutz,Aleksandr Solovev (alexolut),Peter Sommerlad,andTony Van Eerd.

In addition, I would like to thank everyone in the C++ communityand on the C++ standards committee.In addition to all the work involved in adding new language and library features,these experts spent many, many hours explaining and discussing their work with me, andthey did so with patience and enthusiasm.

Special thanks go to the LaTeX communityfor a great text systemand to Frank Mittelbach for solving my LaTeX issues(it was almost always my fault).

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «C++ Move Semantics - The Complete Guide»

Look at similar books to C++ Move Semantics - The Complete Guide. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «C++ Move Semantics - The Complete Guide»

Discussion, reviews of the book C++ Move Semantics - The Complete Guide and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.