[CXX-353] Suppress warning regarding default initialized array member on MSVC Created: 23/Sep/14  Updated: 23/Oct/14  Resolved: 03/Oct/14

Status: Closed
Project: C++ Driver
Component/s: BSON
Affects Version/s: None
Fix Version/s: legacy-1.0.0-rc1

Type: Bug Priority: Minor - P4
Reporter: Adam Midvidy Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: legacy-cxx
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-15358 warning C4351: new behavior: elements... Closed

 Description   

In old versions of MSVC "when an an array was in a constructor's member initialization list, the elements of the array may not have been default initialized in some cases."

Source: http://msdn.microsoft.com/en-us/library/1ywe7hcy.aspx

Since this affects extremely old MSVC (pre-2k5), we should just squash the warning. This will come by way of server backport (see linked issue)



 Comments   
Comment by Andrew Morrow (Inactive) [ 01/Oct/14 ]

https://github.com/mongodb/mongo-cxx-driver/pull/171

Comment by Andrew Morrow (Inactive) [ 23/Sep/14 ]

Taking a closer look at the docs:

http://msdn.microsoft.com/en-us/library/1ywe7hcy(v=vs.80).aspx

This was new behavior in VS 2005. I doubt very much we need to support anything older than that.

Generated at Wed Feb 07 21:58:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.