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

ShardRegistry triggers clang 3.7's Wpessimizing-move warning

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.9
    • Component/s: Internal Code, Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      QuInt A (10/12/15)

      Description

      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.
      

        Attachments

          Activity

            People

            Assignee:
            redbeard0531 Mathias Stearn
            Reporter:
            redbeard0531 Mathias Stearn
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: