Boost logo

Boost Users :

Subject: [Boost-users] boost.type_traits - is_convertible issue with aligned types
From: Christoph Heindl (christoph.heindl_at_[hidden])
Date: 2011-01-18 09:35:00


Hi,

consider the following simple example

  struct aligned_type {
    __declspec(align(16)) float vals[4];
  };
  BOOST_STATIC_ASSERT((boost::is_convertible<aligned_type ,
aligned_type >::value));

It fails on MSVC 9.0 with boost 1.43 with the following error

  type_traits/is_convertible.hpp(254) : error C2719:
'unnamed-parameter': formal parameter with __declspec(align('16'))
won't be aligned

References won't help either

  BOOST_STATIC_ASSERT((boost::is_convertible<aligned_type &,
aligned_type &>::value));

as it breaks with a similar error

  type_traits/is_convertible.hpp(263) : error C2718: 'const
vec_aligned': actual parameter with __declspec(align('16')) won't be
aligned

A bug database search did not bring up any relevant matches, so I
wonder if that is a new issue or just by design?

Best regards,
Christoph


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net