[SERVER-13600] Remove copying implicit conversions between NamespaceString and std::string. Created: 15/Apr/14 Updated: 11/Jul/16 Resolved: 15/Apr/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 2.7.0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Andy Schwerin | Assignee: | Andy Schwerin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Participants: |
| Description |
|
These implicit conversions are dangerous when combined with pass-by-reference, plus they introduce unexpected copies. While it would be ideal to remove all implicit conversion between the types, an expedient step along the way is to remove implicit construction of NamespaceStrings and std::strings, while still allowing implicit casting from const NamespaceString& to std::string&. |
| Comments |
| Comment by Githook User [ 15/Apr/14 ] |
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}Message: By replacing the implicit conversion operator from const |
| Comment by Githook User [ 15/Apr/14 ] |
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}Message: |