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

pessimizing moves

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.5
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Sharding 13 (04/22/16)

      Description

      src/mongo/s/client/shard_factory_impl.cpp:46:55: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
          return stdx::make_unique<Shard>(shardId, connStr, std::move(_targeterFactory.create(connStr)));
                                                            ^
      src/mongo/s/client/shard_factory_impl.cpp:46:55: note: remove std::move call here
          return stdx::make_unique<Shard>(shardId, connStr, std::move(_targeterFactory.create(connStr)));
                                                            ^~~~~~~~~~                                ~
      src/mongo/s/client/shard_factory_impl.cpp:52:54: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
          return std::make_shared<Shard>(shardId, connStr, std::move(_targeterFactory.create(connStr)));
                                                           ^
      src/mongo/s/client/shard_factory_impl.cpp:52:54: note: remove std::move call here
          return std::make_shared<Shard>(shardId, connStr, std::move(_targeterFactory.create(connStr)));
                                                           ^~~~~~~~~~                                ~
      Compiling build/opt/mongo/s/catalog/replset/catalog_manager_replica_set.os
      2 errors generated.
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: