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

pessimizing moves

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.3.5
    • None
    • Sharding
    • None
    • Fully Compatible
    • ALL
    • 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

        Activity

          People

            misha.tyulenev@mongodb.com Misha Tyulenev
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: