Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-24108

Pessimizing move warning in chunktests.cpp

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.8
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 14 (05/13/16), Sharding 15 (06/03/16)

      It looks like the warning was introduced via SERVER-24071.

      src/mongo/s/chunk_manager.cpp:199:34: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
                      _chunkRangeMap = std::move(_constructRanges(_chunkMap));
                                       ^
      src/mongo/s/chunk_manager.cpp:199:34: note: remove std::move call here
                      _chunkRangeMap = std::move(_constructRanges(_chunkMap));
                                       ^~~~~~~~~~                           ~
      1 error generated.
      

            Assignee:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Reporter:
            kamran.khan Kamran K.
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: