summaryrefslogtreecommitdiff
path: root/src/mongo/logv2
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2020-10-31 23:38:25 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-11-01 04:01:03 +0000
commit0b6e0b281fe9e07ccfd6e041a5e3fe613e885e6d (patch)
tree536fabf990c8de3215539ead3438dcce596270cc /src/mongo/logv2
parent6fc83f30a8d7fcfa90722bc5cf9a2843820f321b (diff)
downloadmongo-0b6e0b281fe9e07ccfd6e041a5e3fe613e885e6d.tar.gz
SERVER-51888 workaround msvc expression-sfinae access bug
https://developercommunity.visualstudio.com/content/problem/936367/sfinae-sees-private-part-of-a-class.html
Diffstat (limited to 'src/mongo/logv2')
-rw-r--r--src/mongo/logv2/logv2_test.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/logv2/logv2_test.cpp b/src/mongo/logv2/logv2_test.cpp
index e6139d964be..20884459b06 100644
--- a/src/mongo/logv2/logv2_test.cpp
+++ b/src/mongo/logv2/logv2_test.cpp
@@ -127,11 +127,6 @@ struct TypeWithBSON : TypeWithoutBSON {
}
};
-struct TypeWithOnlyBSON : private TypeWithBSON {
- using TypeWithBSON::toBSON;
- using TypeWithBSON::TypeWithBSON;
-};
-
struct TypeWithBSONSerialize : TypeWithoutBSON {
using TypeWithoutBSON::TypeWithoutBSON;
@@ -1799,7 +1794,12 @@ TEST_F(UnstructuredLoggingTest, UserToString) {
}
TEST_F(UnstructuredLoggingTest, UserToBSON) {
- TypeWithOnlyBSON arg(1.0, 2.0);
+ struct TypeWithOnlyBSON {
+ BSONObj toBSON() const {
+ return BSONObjBuilder{}.append("x", 1).append("y", 2).obj();
+ }
+ };
+ TypeWithOnlyBSON arg;
logd("{}", arg); // NOLINT
validate([&arg](const BSONObj& obj) {
ASSERT_EQUALS(obj.getField(kMessageFieldName).String(), arg.toBSON().toString());