[SERVER-20670] ShardRegistry triggers clang 3.7's Wpessimizing-move warning Created: 28/Sep/15  Updated: 07/Oct/15  Resolved: 28/Sep/15

Status: Closed
Project: Core Server
Component/s: Internal Code, Sharding
Affects Version/s: None
Fix Version/s: 3.1.9

Type: Bug Priority: Major - P3
Reporter: Mathias Stearn Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QuInt A (10/12/15)
Participants:

 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.



 Comments   
Comment by Githook User [ 28/Sep/15 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-20670 Remove pessimizing move from ShardRegistry

Triggers a warning with clang 3.7
Branch: master
https://github.com/mongodb/mongo/commit/e398ed67b299bdc574bb141eaa474a983643fbff

Generated at Thu Feb 08 03:54:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.