Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r85168 - trunk/boost/container/detail
From: igaztanaga_at_[hidden]
Date: 2013-07-29 17:33:20


Author: igaztanaga
Date: 2013-07-29 17:33:20 EDT (Mon, 29 Jul 2013)
New Revision: 85168
URL: http://svn.boost.org/trac/boost/changeset/85168

Log:
Fixes #8473

Text files modified:
   trunk/boost/container/detail/utilities.hpp | 4 ++++
   trunk/boost/container/detail/workaround.hpp | 6 ++++++
   2 files changed, 10 insertions(+), 0 deletions(-)

Modified: trunk/boost/container/detail/utilities.hpp
==============================================================================
--- trunk/boost/container/detail/utilities.hpp Mon Jul 29 17:32:23 2013 (r85167)
+++ trunk/boost/container/detail/utilities.hpp 2013-07-29 17:33:20 EDT (Mon, 29 Jul 2013) (r85168)
@@ -12,6 +12,7 @@
 #define BOOST_CONTAINER_DETAIL_UTILITIES_HPP
 
 #include "config_begin.hpp"
+#include "workaround.hpp"
 #include <cstdio>
 #include <cstring> //for ::memcpy
 #include <boost/type_traits/is_fundamental.hpp>
@@ -1055,18 +1056,21 @@
          ::memcpy(short_ptr, stora_ptr, sizeof_storage);
          large_ptr += sizeof_storage;
          short_ptr += sizeof_storage;
+ BOOST_CONTAINER_FALLTHOUGH
       case 3:
          ::memcpy(stora_ptr, large_ptr, sizeof_storage);
          ::memcpy(large_ptr, short_ptr, sizeof_storage);
          ::memcpy(short_ptr, stora_ptr, sizeof_storage);
          large_ptr += sizeof_storage;
          short_ptr += sizeof_storage;
+ BOOST_CONTAINER_FALLTHOUGH
       case 2:
          ::memcpy(stora_ptr, large_ptr, sizeof_storage);
          ::memcpy(large_ptr, short_ptr, sizeof_storage);
          ::memcpy(short_ptr, stora_ptr, sizeof_storage);
          large_ptr += sizeof_storage;
          short_ptr += sizeof_storage;
+ BOOST_CONTAINER_FALLTHOUGH
       case 1:
          ::memcpy(stora_ptr, large_ptr, sizeof_storage);
          ::memcpy(large_ptr, short_ptr, sizeof_storage);

Modified: trunk/boost/container/detail/workaround.hpp
==============================================================================
--- trunk/boost/container/detail/workaround.hpp Mon Jul 29 17:32:23 2013 (r85167)
+++ trunk/boost/container/detail/workaround.hpp 2013-07-29 17:33:20 EDT (Mon, 29 Jul 2013) (r85168)
@@ -35,6 +35,12 @@
    #define BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST
 #endif
 
+#if !defined(BOOST_FALLTHOUGH)
+ #define BOOST_CONTAINER_FALLTHOUGH
+#else
+ #define BOOST_CONTAINER_FALLTHOUGH BOOST_FALLTHOUGH;
+#endif
+
 //Macros for documentation purposes. For code, expands to the argument
 #define BOOST_CONTAINER_IMPDEF(TYPE) TYPE
 #define BOOST_CONTAINER_SEEDOC(TYPE) TYPE


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