boost/libs/config/test/boost_fallthrough_test.cpp

22 lines
416 B
C++
Raw Normal View History

2021-10-05 21:37:46 +02:00
// (C) Copyright John Maddock 2013.
2018-01-12 21:47:58 +01:00
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/config.hpp>
int test(int n)
{
switch (n)
{
case 0:
n++;
BOOST_FALLTHROUGH;
case 1:
n++;
break;
}
return n;
}