forked from boostorg/mp11
Make the default (unreachable) label the first one
This commit is contained in:
@@ -80,9 +80,9 @@ template<> struct mp_with_index_impl_<2>
|
||||
{
|
||||
switch( i )
|
||||
{
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
case 0: return std::forward<F>(f)( mp_size_t<K+0>() );
|
||||
case 1: return std::forward<F>(f)( mp_size_t<K+1>() );
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -93,10 +93,10 @@ template<> struct mp_with_index_impl_<3>
|
||||
{
|
||||
switch( i )
|
||||
{
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
case 0: return std::forward<F>(f)( mp_size_t<K+0>() );
|
||||
case 1: return std::forward<F>(f)( mp_size_t<K+1>() );
|
||||
case 2: return std::forward<F>(f)( mp_size_t<K+2>() );
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -107,11 +107,11 @@ template<> struct mp_with_index_impl_<4>
|
||||
{
|
||||
switch( i )
|
||||
{
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
case 0: return std::forward<F>(f)( mp_size_t<K+0>() );
|
||||
case 1: return std::forward<F>(f)( mp_size_t<K+1>() );
|
||||
case 2: return std::forward<F>(f)( mp_size_t<K+2>() );
|
||||
case 3: return std::forward<F>(f)( mp_size_t<K+3>() );
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -122,12 +122,12 @@ template<> struct mp_with_index_impl_<5>
|
||||
{
|
||||
switch( i )
|
||||
{
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
case 0: return std::forward<F>(f)( mp_size_t<K+0>() );
|
||||
case 1: return std::forward<F>(f)( mp_size_t<K+1>() );
|
||||
case 2: return std::forward<F>(f)( mp_size_t<K+2>() );
|
||||
case 3: return std::forward<F>(f)( mp_size_t<K+3>() );
|
||||
case 4: return std::forward<F>(f)( mp_size_t<K+4>() );
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -138,13 +138,13 @@ template<> struct mp_with_index_impl_<6>
|
||||
{
|
||||
switch( i )
|
||||
{
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
case 0: return std::forward<F>(f)( mp_size_t<K+0>() );
|
||||
case 1: return std::forward<F>(f)( mp_size_t<K+1>() );
|
||||
case 2: return std::forward<F>(f)( mp_size_t<K+2>() );
|
||||
case 3: return std::forward<F>(f)( mp_size_t<K+3>() );
|
||||
case 4: return std::forward<F>(f)( mp_size_t<K+4>() );
|
||||
case 5: return std::forward<F>(f)( mp_size_t<K+5>() );
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -155,6 +155,7 @@ template<> struct mp_with_index_impl_<7>
|
||||
{
|
||||
switch( i )
|
||||
{
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
case 0: return std::forward<F>(f)( mp_size_t<K+0>() );
|
||||
case 1: return std::forward<F>(f)( mp_size_t<K+1>() );
|
||||
case 2: return std::forward<F>(f)( mp_size_t<K+2>() );
|
||||
@@ -162,7 +163,6 @@ template<> struct mp_with_index_impl_<7>
|
||||
case 4: return std::forward<F>(f)( mp_size_t<K+4>() );
|
||||
case 5: return std::forward<F>(f)( mp_size_t<K+5>() );
|
||||
case 6: return std::forward<F>(f)( mp_size_t<K+6>() );
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -173,6 +173,7 @@ template<> struct mp_with_index_impl_<8>
|
||||
{
|
||||
switch( i )
|
||||
{
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
case 0: return std::forward<F>(f)( mp_size_t<K+0>() );
|
||||
case 1: return std::forward<F>(f)( mp_size_t<K+1>() );
|
||||
case 2: return std::forward<F>(f)( mp_size_t<K+2>() );
|
||||
@@ -181,7 +182,6 @@ template<> struct mp_with_index_impl_<8>
|
||||
case 5: return std::forward<F>(f)( mp_size_t<K+5>() );
|
||||
case 6: return std::forward<F>(f)( mp_size_t<K+6>() );
|
||||
case 7: return std::forward<F>(f)( mp_size_t<K+7>() );
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -192,6 +192,7 @@ template<> struct mp_with_index_impl_<9>
|
||||
{
|
||||
switch( i )
|
||||
{
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
case 0: return std::forward<F>(f)( mp_size_t<K+0>() );
|
||||
case 1: return std::forward<F>(f)( mp_size_t<K+1>() );
|
||||
case 2: return std::forward<F>(f)( mp_size_t<K+2>() );
|
||||
@@ -201,7 +202,6 @@ template<> struct mp_with_index_impl_<9>
|
||||
case 6: return std::forward<F>(f)( mp_size_t<K+6>() );
|
||||
case 7: return std::forward<F>(f)( mp_size_t<K+7>() );
|
||||
case 8: return std::forward<F>(f)( mp_size_t<K+8>() );
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -212,6 +212,7 @@ template<> struct mp_with_index_impl_<10>
|
||||
{
|
||||
switch( i )
|
||||
{
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
case 0: return std::forward<F>(f)( mp_size_t<K+0>() );
|
||||
case 1: return std::forward<F>(f)( mp_size_t<K+1>() );
|
||||
case 2: return std::forward<F>(f)( mp_size_t<K+2>() );
|
||||
@@ -222,7 +223,6 @@ template<> struct mp_with_index_impl_<10>
|
||||
case 7: return std::forward<F>(f)( mp_size_t<K+7>() );
|
||||
case 8: return std::forward<F>(f)( mp_size_t<K+8>() );
|
||||
case 9: return std::forward<F>(f)( mp_size_t<K+9>() );
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -233,6 +233,7 @@ template<> struct mp_with_index_impl_<11>
|
||||
{
|
||||
switch( i )
|
||||
{
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
case 0: return std::forward<F>(f)( mp_size_t<K+0>() );
|
||||
case 1: return std::forward<F>(f)( mp_size_t<K+1>() );
|
||||
case 2: return std::forward<F>(f)( mp_size_t<K+2>() );
|
||||
@@ -244,7 +245,6 @@ template<> struct mp_with_index_impl_<11>
|
||||
case 8: return std::forward<F>(f)( mp_size_t<K+8>() );
|
||||
case 9: return std::forward<F>(f)( mp_size_t<K+9>() );
|
||||
case 10: return std::forward<F>(f)( mp_size_t<K+10>() );
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -255,6 +255,7 @@ template<> struct mp_with_index_impl_<12>
|
||||
{
|
||||
switch( i )
|
||||
{
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
case 0: return std::forward<F>(f)( mp_size_t<K+0>() );
|
||||
case 1: return std::forward<F>(f)( mp_size_t<K+1>() );
|
||||
case 2: return std::forward<F>(f)( mp_size_t<K+2>() );
|
||||
@@ -267,7 +268,6 @@ template<> struct mp_with_index_impl_<12>
|
||||
case 9: return std::forward<F>(f)( mp_size_t<K+9>() );
|
||||
case 10: return std::forward<F>(f)( mp_size_t<K+10>() );
|
||||
case 11: return std::forward<F>(f)( mp_size_t<K+11>() );
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -278,6 +278,7 @@ template<> struct mp_with_index_impl_<13>
|
||||
{
|
||||
switch( i )
|
||||
{
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
case 0: return std::forward<F>(f)( mp_size_t<K+0>() );
|
||||
case 1: return std::forward<F>(f)( mp_size_t<K+1>() );
|
||||
case 2: return std::forward<F>(f)( mp_size_t<K+2>() );
|
||||
@@ -291,7 +292,6 @@ template<> struct mp_with_index_impl_<13>
|
||||
case 10: return std::forward<F>(f)( mp_size_t<K+10>() );
|
||||
case 11: return std::forward<F>(f)( mp_size_t<K+11>() );
|
||||
case 12: return std::forward<F>(f)( mp_size_t<K+12>() );
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -302,6 +302,7 @@ template<> struct mp_with_index_impl_<14>
|
||||
{
|
||||
switch( i )
|
||||
{
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
case 0: return std::forward<F>(f)( mp_size_t<K+0>() );
|
||||
case 1: return std::forward<F>(f)( mp_size_t<K+1>() );
|
||||
case 2: return std::forward<F>(f)( mp_size_t<K+2>() );
|
||||
@@ -316,7 +317,6 @@ template<> struct mp_with_index_impl_<14>
|
||||
case 11: return std::forward<F>(f)( mp_size_t<K+11>() );
|
||||
case 12: return std::forward<F>(f)( mp_size_t<K+12>() );
|
||||
case 13: return std::forward<F>(f)( mp_size_t<K+13>() );
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -327,6 +327,7 @@ template<> struct mp_with_index_impl_<15>
|
||||
{
|
||||
switch( i )
|
||||
{
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
case 0: return std::forward<F>(f)( mp_size_t<K+0>() );
|
||||
case 1: return std::forward<F>(f)( mp_size_t<K+1>() );
|
||||
case 2: return std::forward<F>(f)( mp_size_t<K+2>() );
|
||||
@@ -342,7 +343,6 @@ template<> struct mp_with_index_impl_<15>
|
||||
case 12: return std::forward<F>(f)( mp_size_t<K+12>() );
|
||||
case 13: return std::forward<F>(f)( mp_size_t<K+13>() );
|
||||
case 14: return std::forward<F>(f)( mp_size_t<K+14>() );
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -353,6 +353,7 @@ template<> struct mp_with_index_impl_<16>
|
||||
{
|
||||
switch( i )
|
||||
{
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
case 0: return std::forward<F>(f)( mp_size_t<K+0>() );
|
||||
case 1: return std::forward<F>(f)( mp_size_t<K+1>() );
|
||||
case 2: return std::forward<F>(f)( mp_size_t<K+2>() );
|
||||
@@ -369,7 +370,6 @@ template<> struct mp_with_index_impl_<16>
|
||||
case 13: return std::forward<F>(f)( mp_size_t<K+13>() );
|
||||
case 14: return std::forward<F>(f)( mp_size_t<K+14>() );
|
||||
case 15: return std::forward<F>(f)( mp_size_t<K+15>() );
|
||||
default: BOOST_MP11_UNREACHABLE();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user