From 4e92a024fb505f89d1b36d92f73fcb9142647ed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Mon, 29 Jul 2013 21:33:20 +0000 Subject: [PATCH] Fixes #8473 [SVN r85168] --- include/boost/container/detail/utilities.hpp | 4 ++++ include/boost/container/detail/workaround.hpp | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/include/boost/container/detail/utilities.hpp b/include/boost/container/detail/utilities.hpp index 81e0ed8..776a770 100644 --- a/include/boost/container/detail/utilities.hpp +++ b/include/boost/container/detail/utilities.hpp @@ -12,6 +12,7 @@ #define BOOST_CONTAINER_DETAIL_UTILITIES_HPP #include "config_begin.hpp" +#include "workaround.hpp" #include #include //for ::memcpy #include @@ -1055,18 +1056,21 @@ inline typename container_detail::enable_if_c ::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); diff --git a/include/boost/container/detail/workaround.hpp b/include/boost/container/detail/workaround.hpp index 06cb733..49fe284 100644 --- a/include/boost/container/detail/workaround.hpp +++ b/include/boost/container/detail/workaround.hpp @@ -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