[SERVER-39032] add StringBuilder insertion "operator<<" for NamespaceString Created: 16/Jan/19  Updated: 29/Oct/23  Resolved: 24/Jan/19

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.1.8

Type: Improvement Priority: Trivial - P5
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Storage NYC 2019-01-28
Participants:

 Description   

Currently, to add a NamespaceString to an assertion message using a str::stream(), we have to convert the NamespaceString to a std::string using NamespaceString::ns() or NamespaceString(). It would be convenient to have the following StringBuilder overload so that we can do "str::stream() << nss":

StringBuilder& operator<<(StringBuilder&, const NamespaceString&);



 Comments   
Comment by Githook User [ 24/Jan/19 ]

Author:

{'username': 'benety', 'email': 'benety@mongodb.com', 'name': 'Benety Goh'}

Message: SERVER-39032 remove unnecessary NamespaceString::ns() calls from db/storage
Branch: master
https://github.com/mongodb/mongo/commit/d974c6d29971c1c6fdf25f252789db41a6cd90fe

Comment by Githook User [ 24/Jan/19 ]

Author:

{'email': 'benety@mongodb.com', 'name': 'Benety Goh', 'username': 'benety'}

Message: SERVER-39032 remove unnecessary NamespaceString::ns() calls from db/catalog/
Branch: master
https://github.com/mongodb/mongo/commit/057223f7315fe6fc9a248eb252e113fc2af50199

Comment by Githook User [ 24/Jan/19 ]

Author:

{'email': 'benety@mongodb.com', 'name': 'Benety Goh', 'username': 'benety'}

Message: SERVER-39032 add str::stream support to NamespaceString
Branch: master
https://github.com/mongodb/mongo/commit/15ad2f665d4de58e6af45f237b050976a3da34e8

Generated at Thu Feb 08 04:50:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.