forked from boostorg/type_traits
Workaround VC7 bug.
[SVN r15283]
This commit is contained in:
@ -141,17 +141,17 @@ struct ct_if
|
||||
char, short, int, long, float, double, long double \
|
||||
, void*, function_ptr, member_ptr, member_function_ptr))
|
||||
|
||||
#define BOOST_TT_CHOOSE_LOWER_ALIGNMENT(R,P,I,T) \
|
||||
#define BOOST_TT_CHOOSE_MIN_ALIGNMENT(R,P,I,T) \
|
||||
typename ct_if< \
|
||||
alignment_of<T>::value <= target, T, char>::type BOOST_PP_CAT(t,I);
|
||||
|
||||
#define BOOST_TT_CHOOSE_T(R,P,I,T) T BOOST_PP_CAT(t,I);
|
||||
|
||||
template <std::size_t target>
|
||||
union lower_alignment
|
||||
union min_alignment
|
||||
{
|
||||
BOOST_PP_LIST_FOR_EACH_I(
|
||||
BOOST_TT_CHOOSE_LOWER_ALIGNMENT
|
||||
BOOST_TT_CHOOSE_MIN_ALIGNMENT
|
||||
, ignored, BOOST_TT_ALIGNMENT_TYPES)
|
||||
};
|
||||
|
||||
@ -163,7 +163,7 @@ union max_align
|
||||
};
|
||||
|
||||
#undef BOOST_TT_ALIGNMENT_TYPES
|
||||
#undef BOOST_TT_CHOOSE_LOWER_ALIGNMENT
|
||||
#undef BOOST_TT_CHOOSE_MIN_ALIGNMENT
|
||||
#undef BOOST_TT_CHOOSE_T
|
||||
|
||||
template<int TAlign, int Align>
|
||||
@ -180,7 +180,7 @@ struct is_aligned
|
||||
template <int Align>
|
||||
class type_with_alignment
|
||||
{
|
||||
typedef detail::lower_alignment<Align> t1;
|
||||
typedef detail::min_alignment<Align> t1;
|
||||
|
||||
typedef type_with_alignment<Align> this_type;
|
||||
|
||||
|
Reference in New Issue
Block a user