Ticket #8408: boost-fallthrough.diff

File boost-fallthrough.diff, 30.8 KB (added by Alexander Kornienko <alexfh@…>, 10 years ago)

Patch with BOOST_FALLTHROUGH macro and fixes to Boost sources/headers

  • boost/config/compiler/clang.hpp

     
    3838#  define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
    3939#endif
    4040
     41//
     42// The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through
     43// between switch labels.
     44//
     45#if __cplusplus >= 201103L && defined(__has_warning)
     46#  if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough")
     47#    define BOOST_FALLTHROUGH [[clang::fallthrough]]
     48#  endif
     49#endif
     50
    4151#if !__has_feature(cxx_auto_type)
    4252#  define BOOST_NO_CXX11_AUTO_DECLARATIONS
    4353#  define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
  • boost/config/suffix.hpp

     
    885885#endif
    886886
    887887//
     888// Helper macro BOOST_FALLTHROUGH
     889// Fallback definition of BOOST_FALLTHROUGH macro used to mark intended
     890// fall-through between case labels in a switch statement.
     891//
     892#ifndef BOOST_FALLTHROUGH
     893#  define BOOST_FALLTHROUGH do {} while(0)
     894#endif
     895
     896//
    888897// constexpr workarounds
    889898//
    890899#if defined(BOOST_NO_CXX11_CONSTEXPR)
  • boost/container/detail/utilities.hpp

     
    10551055         ::memcpy(short_ptr, stora_ptr, sizeof_storage);
    10561056         large_ptr += sizeof_storage;
    10571057         short_ptr += sizeof_storage;
     1058         BOOST_FALLTHROUGH;
    10581059      case 3:
    10591060         ::memcpy(stora_ptr, large_ptr, sizeof_storage);
    10601061         ::memcpy(large_ptr, short_ptr, sizeof_storage);
    10611062         ::memcpy(short_ptr, stora_ptr, sizeof_storage);
    10621063         large_ptr += sizeof_storage;
    10631064         short_ptr += sizeof_storage;
     1065         BOOST_FALLTHROUGH;
    10641066      case 2:
    10651067         ::memcpy(stora_ptr, large_ptr, sizeof_storage);
    10661068         ::memcpy(large_ptr, short_ptr, sizeof_storage);
    10671069         ::memcpy(short_ptr, stora_ptr, sizeof_storage);
    10681070         large_ptr += sizeof_storage;
    10691071         short_ptr += sizeof_storage;
     1072         BOOST_FALLTHROUGH;
    10701073      case 1:
    10711074         ::memcpy(stora_ptr, large_ptr, sizeof_storage);
    10721075         ::memcpy(large_ptr, short_ptr, sizeof_storage);
  • boost/date_time/time_facet.hpp

     
    866866                    break;
    867867                  // %s is the same as %S%f so we drop through into %f
    868868                }
     869                BOOST_FALLTHROUGH;
    869870              case 'f':
    870871                {
    871872                  // check for decimal, check special_values if missing
     
    11351136                      break;
    11361137                    // %s is the same as %S%f so we drop through into %f
    11371138                  }
     1139                  BOOST_FALLTHROUGH;
    11381140                case 'f':
    11391141                  {
    11401142                    // check for decimal, check SV if missing
  • boost/format/parsing.hpp

     
    267267        switch ( wrap_narrow(fac, *start, 0) ) {
    268268        case 'X':
    269269            fpar->fmtstate_.flags_ |= std::ios_base::uppercase;
     270            BOOST_FALLTHROUGH;
    270271        case 'p': // pointer => set hex.
    271272        case 'x':
    272273            fpar->fmtstate_.flags_ &= ~std::ios_base::basefield;
     
    280281
    281282        case 'E':
    282283            fpar->fmtstate_.flags_ |=  std::ios_base::uppercase;
     284            BOOST_FALLTHROUGH;
    283285        case 'e':
    284286            fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield;
    285287            fpar->fmtstate_.flags_ |=  std::ios_base::scientific;
     
    291293        case 'f':
    292294            fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield;
    293295            fpar->fmtstate_.flags_ |=  std::ios_base::fixed;
     296            BOOST_FALLTHROUGH;
    294297        case 'u':
    295298        case 'd':
    296299        case 'i':
  • boost/iostreams/code_converter.hpp

     
    393393
    394394        switch (result) {
    395395        case std::codecvt_base::partial:
    396             partial = true; // Fall through.
     396            partial = true;
     397            BOOST_FALLTHROUGH;
    397398        case std::codecvt_base::ok:
    398399            total = static_cast<std::streamsize>(nint - s);
    399400            break;
  • boost/locale/utf.hpp

     
    222222                if (!is_trail(tmp))
    223223                    return illegal;
    224224                c = (c << 6) | ( tmp & 0x3F);
     225                BOOST_FALLTHROUGH;
    225226            case 2:
    226227                if(BOOST_LOCALE_UNLIKELY(p==e))
    227228                    return incomplete;
     
    229230                if (!is_trail(tmp))
    230231                    return illegal;
    231232                c = (c << 6) | ( tmp & 0x3F);
     233                BOOST_FALLTHROUGH;
    232234            case 1:
    233235                if(BOOST_LOCALE_UNLIKELY(p==e))
    234236                    return incomplete;
     
    272274            switch(trail_size) {
    273275            case 3:
    274276                c = (c << 6) | ( static_cast<unsigned char>(*p++) & 0x3F);
     277                BOOST_FALLTHROUGH;
    275278            case 2:
    276279                c = (c << 6) | ( static_cast<unsigned char>(*p++) & 0x3F);
     280                BOOST_FALLTHROUGH;
    277281            case 1:
    278282                c = (c << 6) | ( static_cast<unsigned char>(*p++) & 0x3F);
    279283            }
  • boost/regex/v4/basic_regex_creator.hpp

     
    738738      case syntax_element_long_set_rep:
    739739         // set the state_id of this repeat:
    740740         static_cast<re_repeat*>(state)->state_id = m_repeater_id++;
    741          // fall through:
     741         BOOST_FALLTHROUGH;
    742742      case syntax_element_alt:
    743743         std::memset(static_cast<re_alt*>(state)->_map, 0, sizeof(static_cast<re_alt*>(state)->_map));
    744744         static_cast<re_alt*>(state)->can_be_null = 0;
    745          // fall through:
     745         BOOST_FALLTHROUGH;
    746746      case syntax_element_jump:
    747747         static_cast<re_jump*>(state)->alt.p = getaddress(static_cast<re_jump*>(state)->alt.i, state);
    748          // fall through again:
     748         BOOST_FALLTHROUGH;
    749749      default:
    750750         if(state->next.i)
    751751            state->next.p = getaddress(state->next.i, state);
     
    877877               }
    878878            }
    879879         }
     880         break;
    880881      default:
    881882         break;
    882883      }
     
    941942               e.raise();
    942943            }
    943944         }
    944          // fall through:
     945         BOOST_FALLTHROUGH;
    945946      default:
    946947         state = state->next.p;
    947948      }
     
    11531154               break;
    11541155            }
    11551156            m_recursion_checks[recursion_sub] = true;
    1156             // fall through, can't handle nested recursion here...
     1157            // can't handle nested recursion here...
     1158            BOOST_FALLTHROUGH;
    11571159         }
    11581160      case syntax_element_backref:
    11591161         // can be null, and any character can match:
    11601162         if(pnull)
    11611163            *pnull |= mask;
    1162          // fall through:
     1164         BOOST_FALLTHROUGH;
    11631165      case syntax_element_wild:
    11641166      {
    11651167         // can't be null, any character can match:
     
    13591361            state = state->next.p->next.p;
    13601362            break;
    13611363         }
    1362          // otherwise fall through:
     1364         BOOST_FALLTHROUGH;
    13631365      default:
    13641366         state = state->next.p;
    13651367      }
     
    14561458         if(state_id <= sizeof(m_bad_repeats) * CHAR_BIT)
    14571459            m_bad_repeats |= (one << state_id);
    14581460      }
     1461      break;
    14591462   default:
    14601463      break;
    14611464   }
     
    15371540      case syntax_element_long_set_rep:
    15381541         if(this->m_has_backrefs == 0)
    15391542            static_cast<re_repeat*>(state)->leading = true;
    1540          // fall through:
     1543         BOOST_FALLTHROUGH;
    15411544      default:
    15421545         return;
    15431546      }
  • boost/regex/v4/basic_regex_parser.hpp

     
    369369         while((m_position != m_end) && !is_separator(*m_position++)){}
    370370         return true;
    371371      }
    372       // Otherwise fall through:
     372      BOOST_FALLTHROUGH;
    373373   default:
    374374      result = parse_literal();
    375375      break;
     
    623623         {
    624624         case 'w':
    625625            negate = false;
    626             // fall through:
     626            BOOST_FALLTHROUGH;
    627627         case 'W':
    628628            {
    629629            basic_char_set<charT, traits> char_set;
     
    640640            }
    641641         case 's':
    642642            negate = false;
    643             // fall through:
     643            BOOST_FALLTHROUGH;
    644644         case 'S':
    645645            return add_emacs_code(negate);
    646646         case 'c':
     
    672672   {
    673673   case regex_constants::escape_type_not_class:
    674674      negate = true;
    675       // fall through:
     675      BOOST_FALLTHROUGH;
    676676   case regex_constants::escape_type_class:
    677677      {
    678678escape_type_class_jump:
     
    742742      break;
    743743   case regex_constants::escape_type_not_property:
    744744      negate = true;
    745       // fall through:
     745      BOOST_FALLTHROUGH;
    746746   case regex_constants::escape_type_property:
    747747      {
    748748         ++m_position;
     
    901901   case regex_constants::escape_type_control_v:
    902902      if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
    903903         goto escape_type_class_jump;
    904       // fallthrough:
     904      BOOST_FALLTHROUGH;
    905905   default:
    906906      this->append_literal(unescape_character());
    907907      break;
     
    19591959   {
    19601960   case regex_constants::syntax_or:
    19611961      m_mark_reset = m_mark_count;
    1962       // fall through:
     1962      BOOST_FALLTHROUGH;
    19631963   case regex_constants::syntax_colon:
    19641964      //
    19651965      // a non-capturing mark:
  • boost/regex/v4/regex_format.hpp

     
    283283            format_perl();
    284284            break;
    285285         }
    286          // fall through, not a special character:
     286         // not a special character:
     287         BOOST_FALLTHROUGH;
    287288      default:
    288289         put(*m_position);
    289290         ++m_position;
     
    354355   case '{':
    355356      have_brace = true;
    356357      ++m_position;
    357       // fall through....
     358      BOOST_FALLTHROUGH;
    358359   default:
    359360      // see if we have a number:
    360361      {
  • boost/statechart/simple_state.hpp

     
    527527          {
    528528            pContext_->set_outermost_unstable_state(
    529529              pOutermostUnstableState );
    530             // fall through to next case intended
     530            BOOST_FALLTHROUGH;
    531531          }
    532532          else
    533533          {
  • boost/wave/util/flex_string.hpp

     
    139139        case 0:
    140140            while (b != e)
    141141            {
    142                 *b = c; ++b;
    143         case 7: *b = c; ++b;
    144         case 6: *b = c; ++b;
    145         case 5: *b = c; ++b;
    146         case 4: *b = c; ++b;
    147         case 3: *b = c; ++b;
    148         case 2: *b = c; ++b;
     142                *b = c; ++b; BOOST_FALLTHROUGH;
     143        case 7: *b = c; ++b; BOOST_FALLTHROUGH;
     144        case 6: *b = c; ++b; BOOST_FALLTHROUGH;
     145        case 5: *b = c; ++b; BOOST_FALLTHROUGH;
     146        case 4: *b = c; ++b; BOOST_FALLTHROUGH;
     147        case 3: *b = c; ++b; BOOST_FALLTHROUGH;
     148        case 2: *b = c; ++b; BOOST_FALLTHROUGH;
    149149        case 1: *b = c; ++b;
    150150            }
    151151        }
  • boost/xpressive/detail/dynamic/parse_charset.hpp

     
    246246            case token_charset_hyphen:
    247247            case token_charset_invert:
    248248                begin = iprev2; // un-get these tokens and fall through
     249                BOOST_FALLTHROUGH;
    249250            case token_literal:
    250251                ch_next = *begin++;
    251252                BOOST_XPR_ENSURE_(ch_prev <= ch_next, error_range, "invalid charset range");
     
    264265                    chset.set_range(ch_prev, esc.ch_, rxtraits, icase);
    265266                    continue;
    266267                }
    267             case token_charset_end: // fall through
     268                BOOST_FALLTHROUGH;
     269            case token_charset_end:
    268270            default:                // not a range.
    269271                begin = iprev;      // backup to hyphen token
    270272                chset.set_char(ch_prev, rxtraits, icase);
  • boost/xpressive/detail/dynamic/parser_traits.hpp

     
    394394        case BOOST_XPR_CHAR_(char_type, 'm'): this->flag_(!set, single_line); break;
    395395        case BOOST_XPR_CHAR_(char_type, 's'): this->flag_(!set, not_dot_newline); break;
    396396        case BOOST_XPR_CHAR_(char_type, 'x'): this->flag_(set, ignore_white_space); break;
    397         case BOOST_XPR_CHAR_(char_type, ':'): ++begin; // fall-through
     397        case BOOST_XPR_CHAR_(char_type, ':'): ++begin; BOOST_FALLTHROUGH;
    398398        case BOOST_XPR_CHAR_(char_type, ')'): return token_no_mark;
    399         case BOOST_XPR_CHAR_(char_type, '-'): if(false == (set = !set)) break; // else fall-through
     399        case BOOST_XPR_CHAR_(char_type, '-'): if(false == (set = !set)) break; BOOST_FALLTHROUGH;
    400400        default: BOOST_THROW_EXCEPTION(regex_error(error_paren, "unknown pattern modifier"));
    401401        }
    402402        while(BOOST_XPR_ENSURE_(++begin != end, error_paren, "incomplete extension"));
  • boost/xpressive/match_results.hpp

     
    10961096            case BOOST_XPR_CHAR_(char_type, ':'):
    10971097                if(metacolon)
    10981098                {
     1099                    BOOST_FALLTHROUGH;
    10991100            case BOOST_XPR_CHAR_(char_type, ')'):
    11001101                    ++cur;
    11011102                    return out;
    11021103                }
    1103                 // else fall-through
     1104                BOOST_FALLTHROUGH;
    11041105
    11051106            default:
    11061107                *out++ = *cur++;
  • boost/xpressive/regex_compiler.hpp

     
    282282            break;
    283283        case 2:
    284284            seq = detail::make_dynamic<BidiIter>(alternate_matcher()) | seq;
    285             // fall-through
     285            BOOST_FALLTHROUGH;
    286286        default:
    287287            seq |= this->parse_sequence(tmp, end);
    288288        }
     
    322322            break;
    323323
    324324        case token_negative_lookahead:
    325             negative = true; // fall-through
     325            negative = true;
     326            BOOST_FALLTHROUGH;
    326327        case token_positive_lookahead:
    327328            lookahead = true;
    328329            break;
    329330
    330331        case token_negative_lookbehind:
    331             negative = true; // fall-through
     332            negative = true;
     333            BOOST_FALLTHROUGH;
    332334        case token_positive_lookbehind:
    333335            lookbehind = true;
    334336            break;
     
    342344            {
    343345                switch(this->traits_.get_token(begin, end))
    344346                {
    345                 case token_group_end: return this->parse_atom(begin, end);
    346                 case token_escape: BOOST_XPR_ENSURE_(begin != end, error_escape, "incomplete escape sequence");
    347                 case token_literal: ++begin;
    348                 default:;
     347                case token_group_end:
     348                    return this->parse_atom(begin, end);
     349                case token_escape:
     350                    BOOST_XPR_ENSURE_(begin != end, error_escape, "incomplete escape sequence");
     351                    BOOST_FALLTHROUGH;
     352                case token_literal:
     353                    ++begin;
     354                    break;
     355                default:
     356                    break;
    349357                }
    350358            }
    351359            break;
     
    688696        {
    689697            switch(this->traits_.get_token(begin, end))
    690698            {
    691             case token_quote_meta_end: return string_type(old_begin, old_end);
    692             case token_escape: BOOST_XPR_ENSURE_(begin != end, error_escape, "incomplete escape sequence");
     699            case token_quote_meta_end:
     700                return string_type(old_begin, old_end);
     701            case token_escape:
     702                BOOST_XPR_ENSURE_(begin != end, error_escape, "incomplete escape sequence");
     703                BOOST_FALLTHROUGH;
    693704            case token_invalid_quantifier:
    694             case token_literal: ++begin;
    695             default:;
     705            case token_literal:
     706                ++begin;
     707                BOOST_FALLTHROUGH;
     708            default:
     709                break;
    696710            }
    697711        }
    698712        return string_type(old_begin, begin);
  • libs/config/doc/html/boost_config/boost_macro_reference.html

     
    33<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
    44<title>Boost Macro Reference</title>
    55<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
    6 <meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
     6<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
    77<link rel="home" href="../index.html" title="Boost.Config">
    88<link rel="up" href="../index.html" title="Boost.Config">
    99<link rel="prev" href="../index.html" title="Boost.Config">
     
    2626<div class="titlepage"><div><div><h2 class="title" style="clear: both">
    2727<a name="boost_config.boost_macro_reference"></a><a class="link" href="boost_macro_reference.html" title="Boost Macro Reference">Boost Macro Reference</a>
    2828</h2></div></div></div>
    29 <div class="toc"><dl>
     29<div class="toc"><dl class="toc">
    3030<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_c__03_defects">Macros
    3131      that describe C++03 defects</a></span></dt>
    3232<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_optional_features">Macros
     
    33843384<tr>
    33853385<td>
    33863386                <p>
     3387                  <code class="computeroutput"><span class="identifier">BOOST_FALLTHROUGH</span></code>
     3388                </p>
     3389              </td>
     3390<td>
     3391                <p>
     3392                  The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through
     3393                  between switch labels:
     3394</p>
     3395<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">switch</span> <span class="special">(</span><span class="identifier">x</span><span class="special">)</span> <span class="special">{</span>
     3396  <span class="keyword">case</span> <span class="number">40</span><span class="special">:</span>
     3397  <span class="keyword">case</span> <span class="number">41</span><span class="special">:</span>
     3398    <span class="keyword">if</span> <span class="special">(</span><span class="identifier">truth_is_out_there</span><span class="special">)</span> <span class="special">{</span>
     3399      <span class="special">++</span><span class="identifier">x</span><span class="special">;</span>
     3400      <span class="identifier">BOOST_FALLTHROUGH</span><span class="special">;</span>  <span class="comment">// Use instead of/along with annotations in</span>
     3401                          <span class="comment">// comments.</span>
     3402    <span class="special">}</span> <span class="keyword">else</span> <span class="special">{</span>
     3403      <span class="keyword">return</span> <span class="identifier">x</span><span class="special">;</span>
     3404    <span class="special">}</span>
     3405  <span class="keyword">case</span> <span class="number">42</span><span class="special">:</span>
     3406    <span class="special">...</span>
     3407</pre>
     3408<p>
     3409                  As shown in the example above, the BOOST_FALLTHROUGH macro should
     3410                  be followed by a semicolon. It is designed to mimic control-flow
     3411                  statements like 'break;', so it can be placed in most places where
     3412                  'break;' can, but only if there are no statements on the execution
     3413                  path between it and the next switch label.
     3414                </p>
     3415                <p>
     3416                  When compiled with Clang &gt;3.2 in C++11 mode, the BOOST_FALLTHROUGH
     3417                  macro is expanded to <code class="computeroutput"><span class="special">[[</span><span class="identifier">clang</span><span class="special">::</span><span class="identifier">fallthrough</span><span class="special">]]</span></code>
     3418                  attribute, which is analysed when performing switch labels fall-through
     3419                  diagnostic ('-Wimplicit-fallthrough'). See clang documentation
     3420                  on language extensions for details: http://clang.llvm.org/docs/LanguageExtensions.html#clang__fallthrough
     3421                </p>
     3422                <p>
     3423                  When used with unsupported compilers, the BOOST_FALLTHROUGH macro
     3424                  has no effect on diagnostics.
     3425                </p>
     3426                <p>
     3427                  In either case this macro has no effect on runtime behavior and
     3428                  performance of code.
     3429                </p>
     3430              </td>
     3431</tr>
     3432<tr>
     3433<td>
     3434                <p>
    33873435                  <code class="computeroutput"><span class="identifier">BOOST_EXPLICIT_TEMPLATE_TYPE</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span></code> <code class="computeroutput"><span class="identifier">BOOST_EXPLICIT_TEMPLATE_NON_TYPE</span><span class="special">(</span><span class="identifier">t</span><span class="special">,</span><span class="identifier">v</span><span class="special">)</span></code> <code class="computeroutput"><span class="identifier">BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span></code> <code class="computeroutput"><span class="identifier">BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE</span><span class="special">(</span><span class="identifier">t</span><span class="special">,</span><span class="identifier">v</span><span class="special">)</span></code>
    33883436                </p>
    33893437              </td>
     
    49234971<a name="boost_config.boost_macro_reference.macros_for_libraries_with_separate_source_code"></a><a class="link" href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_for_libraries_with_separate_source_code" title="Macros for libraries with separate source code">Macros
    49244972      for libraries with separate source code</a>
    49254973</h3></div></div></div>
    4926 <div class="toc"><dl>
     4974<div class="toc"><dl class="toc">
    49274975<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_for_libraries_with_separate_source_code.macros_controlling_shared_library_symbol_visibility">Macros
    49284976        controlling shared library symbol visibility</a></span></dt>
    49294977<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_for_libraries_with_separate_source_code.abi_fixing">ABI
  • libs/config/doc/macro_reference.qbk

     
    862862Normally evaluates to nothing, but evaluates to return x; if the compiler
    863863requires a return, even when it can never be reached.
    864864]]
     865[[`BOOST_FALLTHROUGH`][
     866The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through
     867between switch labels:
     868``
     869 switch (x) {
     870   case 40:
     871   case 41:
     872     if (truth_is_out_there) {
     873       ++x;
     874       BOOST_FALLTHROUGH;  // Use instead of/along with annotations in
     875                           // comments.
     876     } else {
     877       return x;
     878     }
     879   case 42:
     880     ...
     881``
     882As shown in the example above, the BOOST_FALLTHROUGH macro should be
     883followed by a semicolon. It is designed to mimic control-flow statements
     884like 'break;', so it can be placed in most places where 'break;' can, but
     885only if there are no statements on the execution path between it and the
     886next switch label.
     887
     888When compiled with Clang >3.2 in C++11 mode, the BOOST_FALLTHROUGH macro is
     889expanded to `[[clang::fallthrough]]` attribute, which is analysed when
     890performing switch labels fall-through diagnostic ('-Wimplicit-fallthrough').
     891See clang documentation on language extensions for details:
     892http://clang.llvm.org/docs/LanguageExtensions.html#clang__fallthrough
     893
     894When used with unsupported compilers, the BOOST_FALLTHROUGH macro has no
     895effect on diagnostics.
     896
     897In either case this macro has no effect on runtime behavior and performance
     898of code.
     899]]
    865900[[`BOOST_EXPLICIT_TEMPLATE_TYPE(t)`
    866901  `BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t,v)`
    867902  `BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)`
  • libs/config/test/boost_no_std_wstreambuf.ipp

     
    6161   case ::std::ios_base::beg:
    6262      if((off < 0) || (off > size))
    6363         return pos_type(off_type(-1));
    64       else
    65          this->setg(g, g + off, g + size);
     64      this->setg(g, g + off, g + size);
     65      BOOST_FALLTHROUGH;
    6666   case ::std::ios_base::end:
    6767      if((off < 0) || (off > size))
    6868         return pos_type(off_type(-1));
    69       else
    70          this->setg(g, g + size - off, g + size);
     69      this->setg(g, g + size - off, g + size);
     70      BOOST_FALLTHROUGH;
    7171   case ::std::ios_base::cur:
    7272   {
    7373      int newpos = pos + off;
  • libs/graph/src/read_graphviz_new.cpp

     
    230230              case '>': return token(token::dash_greater, str);
    231231              default: BOOST_ASSERT (!"Definition of punctuation_token does not match switch statement");
    232232            }
     233            break;
    233234          }
    234235          default: BOOST_ASSERT (!"Definition of punctuation_token does not match switch statement");
    235236        }
     
    604605            }
    605606            default: error("Wanted identifier or left parenthesis as start of port location");
    606607          }
     608          break;
    607609        }
    608610        default: break;
    609611      }
  • libs/locale/src/util/gregorian.cpp

     
    207207                        value += (-value / 7) * 7 + 7;
    208208                    // convert to local DOW
    209209                    value = (value - 1 - first_day_of_week_ + 14) % 7 + 1;
    210                     // fall throght
     210                    BOOST_FALLTHROUGH;
    211211                case day_of_week_local:     ///< Local day of week, for example in France Monday is 1, in US Sunday is 1, [1..7]
    212212                    normalize();
    213213                    tm_updated_.tm_mday += (value - 1) - (tm_updated_.tm_wday - first_day_of_week_ + 7) % 7;
     
    666666                            normalize();
    667667                        }
    668668                    }
     669                    break;
    669670                default:
    670                     ;
     671                    break;
    671672                }
    672673            }
    673674
     
    726727                case week_of_month:
    727728                case week_of_year:
    728729                    factor = 7;
    729                     // fall
     730                    BOOST_FALLTHROUGH;
    730731                case day:
    731732                case day_of_year:
    732733                case day_of_week:
  • libs/locale/test/test_locale.hpp

     
    8181    switch(l) {
    8282    case 3:
    8383        c = (c << 6) | (((unsigned char)s[pos++]) & 0x3F);
     84        BOOST_FALLTHROUGH;
    8485    case 2:
    8586        c = (c << 6) | (((unsigned char)s[pos++]) & 0x3F);
     87        BOOST_FALLTHROUGH;
    8688    case 1:
    8789        c = (c << 6) | (((unsigned char)s[pos++]) & 0x3F);
    8890    }
  • libs/serialization/test/B.hpp

     
    6767            ar >> BOOST_SERIALIZATION_NVP(v);
    6868            ar >> BOOST_SERIALIZATION_NVP(w);
    6969            ar >> BOOST_SERIALIZATION_NVP(x);
     70            break;
    7071        default:
    7172            break;
    7273        }
  • libs/wave/samples/cpp_tokens/slex/cpp_slex_lexer.hpp

     
    658658                    case T_EXTSTRINGLIT:
    659659                    case T_EXTRAWSTRINGLIT:
    660660                        id = token_id(id & ~AltTokenType);
    661                         // fall through
     661                        BOOST_FALLTHROUGH;
    662662
    663663                    case T_CHARLIT:
    664664                    case T_STRINGLIT:
  • tools/quickbook/src/actions.cpp

     
    11011101                    case '\n':
    11021102                    case '\r':
    11031103                        if (depth == 0) return begin;
     1104                        break;
    11041105                    default:
    11051106                        break;
    11061107                    }