-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
Server Serverless 2023-06-12
-
1
When we make NamespaceString::toString() private, the unitest code `ASSERT_EQ(nss1, nss2)` get compile error like this:
C:\data\mci\5b1328debd0837979a36f1bb84db036f\src\src\mongo/unittest/stringify.h(147,1): error C2248: 'mongo::NamespaceString::toString': cannot access private member declared in class 'mongo::NamespaceString' [2023/06/02 01:35:12.657] return x.toString(); [2023/06/02 01:35:12.657] ^ [2023/06/02 01:35:12.657] C:\data\mci\5b1328debd0837979a36f1bb84db036f\src\src\mongo/db/namespace_string.h(861): note: see declaration of 'mongo::NamespaceString::toString' [2023/06/02 01:35:12.657] std::string toString() const {
To resolve this issue, we are going to make the NamespaceString override the stringifyForAssert.
- depends on
-
SERVER-77796 ASSERT problem finding stringifyForAssert overloads by ADL
- Closed
- is depended on by
-
SERVER-74488 Make NamespaceString::toString() private
- Closed