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

ShardRegistry triggers clang 3.7's Wpessimizing-move warning

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.9
    • Affects Version/s: None
    • Component/s: Internal Code, Sharding
    • None
    • Fully Compatible
    • ALL
    • QuInt A (10/12/15)

      src/mongo/s/client/shard_registry.cpp:267:45: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move]
                  shardType.getName(), shardHost, std::move(_targeterFactory->create(shardHost)));
                                                  ^
      src/mongo/s/client/shard_registry.cpp:267:45: note: remove std::move call here
                  shardType.getName(), shardHost, std::move(_targeterFactory->create(shardHost)));
                                                  ^~~~~~~~~~                                   ~
      1 error generated.
      

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: