Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-53603

Audit move constructors for lack of 'noexcept'

    XMLWordPrintable

Details

    • 1

    Description

      Classes with move constructors which are not marked as noexcept result in STL containers pessimising reallocations of that class - see https://quuxplusone.github.io/blog/2022/08/26/vector-pessimization/ for a good description of the problem.

      clang-tidy can flag this - see https://clang.llvm.org/extra/clang-tidy/checks/performance/noexcept-move-constructor.html. We should audit our usage of move constructors to check if there's any which are not marked as noexcept and should be.

      (We may also want to review the other "performance-" checks which clang-tidy provides and see if they are worth enabling.)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            owend Daniel Owen
            drigby Dave Rigby (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty