|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r85928 - trunk/boost/variant
From: antoshkka_at_[hidden]
Date: 2013-09-26 03:46:25
Author: apolukhin
Date: 2013-09-26 03:46:25 EDT (Thu, 26 Sep 2013)
New Revision: 85928
URL: http://svn.boost.org/trac/boost/changeset/85928
Log:
Fix MSVC warning in Boost.Variant (refs #3020)
Text files modified:
trunk/boost/variant/variant.hpp | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
Modified: trunk/boost/variant/variant.hpp
==============================================================================
--- trunk/boost/variant/variant.hpp Thu Sep 26 03:29:25 2013 (r85927)
+++ trunk/boost/variant/variant.hpp 2013-09-26 03:46:25 EDT (Thu, 26 Sep 2013) (r85928)
@@ -1419,6 +1419,11 @@
variant()
{
+#ifdef _MSC_VER
+#pragma warning( push )
+// behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized
+#pragma warning( disable : 4345 )
+#endif
// NOTE TO USER :
// Compile error from here indicates that the first bound
// type is not default-constructible, and so variant cannot
@@ -1426,6 +1431,9 @@
//
new( storage_.address() ) internal_T0();
indicate_which(0); // zero is the index of the first bounded type
+#ifdef _MSC_VER
+#pragma warning( pop )
+#endif
}
private: // helpers, for structors, cont. (below)
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk