From e87486cf7bd2b93b6693e11e3465582488d6db9b Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 10 Apr 2002 04:01:47 +0000 Subject: [PATCH] alignment_traits.hpp: - lots of parentheses for Borland C++ type_traits_test.hpp: - More parentheses for Borland C++ - Move 'align_t' out of type_with_alignment test function 'do_it' (because Borland C++ wants it that way) [SVN r13419] --- include/boost/type_traits/alignment_traits.hpp | 2 +- include/boost/type_traits/type_traits_test.hpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) 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;