diff --git a/include/boost/type_traits/alignment_traits.hpp b/include/boost/type_traits/alignment_traits.hpp index 49f09f8..b509f67 100644 --- a/include/boost/type_traits/alignment_traits.hpp +++ b/include/boost/type_traits/alignment_traits.hpp @@ -185,7 +185,7 @@ class type_with_alignment typedef type_with_alignment this_type; typedef typename detail::ct_if< - detail::is_aligned::value, Align>::value + (detail::is_aligned<(alignment_of::value), Align>::value) , t1 , detail::max_align >::type align_t; diff --git a/include/boost/type_traits/type_traits_test.hpp b/include/boost/type_traits/type_traits_test.hpp index 09c861f..4496dcf 100644 --- a/include/boost/type_traits/type_traits_test.hpp +++ b/include/boost/type_traits/type_traits_test.hpp @@ -200,11 +200,12 @@ struct test_align template struct test_type_with_align { + typedef typename boost::type_with_alignment< + (boost::alignment_of::value)>::type + align_t; + static void do_it() { - typedef typename boost::type_with_alignment< - boost::alignment_of::value>::type - align_t; int align = boost::alignment_of::value; int new_align = boost::alignment_of::value; ++test_count;