Summary
I am using mongocxx in windows visual studio 2019.
When i set std::string value in kvp function's first argument, rumtime error occur in release build.
When i set const char array value in kvp function's first argument, it works without runtime error.
How can i use std::string in kvp function's first argument without runtime error?
Environment
mongoc : 1.23.5
mongocxx : 3.7.2
OS : Windows 10 64-bit
compiler : Visual studio 2019, version : 16.11.27
How to Reproduce
// Test is GTest
TEST(MongoTest, AppendTest)
{ std::string data\{ "abc" };
make_document(kvp(data, "123"));
}
Additional Background
- related to
-
CXX-2726 Do not override CMAKE_BUILD_TYPE for multi-config generators
- Closed