Subject: [Boost-bugs] [Boost C++ Libraries] #5129: Doesn't handle alignment correctly
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-01-27 13:08:43
#5129: Doesn't handle alignment correctly
------------------------------+---------------------------------------------
Reporter: anonymous | Owner: pdimov
Type: Bugs | Status: new
Milestone: To Be Determined | Component: bind
Version: Boost 1.45.0 | Severity: Problem
Keywords: |
------------------------------+---------------------------------------------
The following example won't compile on VS 2008 boost v 1.44:
#include "boost/bind.hpp"
#include "xmmintrin.h"
void example( const __m128& )
{}
int main()
{
boost::bind( example, __m128() )();
}
The reason being that __m128 doesn't have default alignment, causing the
following error: "error C2719: 'a1': formal parameter with
__declspec(align('16')) won't be aligned". The example function in this
case would be able to take the argument, the culprit is in the constructor
of list1 which takes accepts by value, when in this case we'd need to
accept by const reference ( I presume without being familiar with the
details of binds implementation ).
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5129> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC