File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ namespace realm {
29
29
bsoncxx::bsoncxx (const bsoncxx& v) noexcept
30
30
{
31
31
#ifdef CPPREALM_HAVE_GENERATED_BRIDGE_TYPES
32
- * reinterpret_cast <bson::Bson*> (&m_bson) = *reinterpret_cast <const bson::Bson*>(&v.m_bson );
32
+ new (&m_bson) bson::Bson ( *reinterpret_cast <const bson::Bson*>(&v.m_bson ) );
33
33
#else
34
34
m_bson = v.m_bson ;
35
35
#endif
@@ -38,7 +38,7 @@ namespace realm {
38
38
bsoncxx::bsoncxx (bsoncxx&& v) noexcept
39
39
{
40
40
#ifdef CPPREALM_HAVE_GENERATED_BRIDGE_TYPES
41
- * reinterpret_cast <bson::Bson*> (&m_bson) = std::move (*reinterpret_cast <bson::Bson*>(&v.m_bson ));
41
+ new (&m_bson) bson::Bson ( std::move (*reinterpret_cast <bson::Bson*>(&v.m_bson ) ));
42
42
#else
43
43
m_bson = std::move (v.m_bson );
44
44
#endif
You can’t perform that action at this time.
0 commit comments