Opened 12 years ago

Last modified 9 years ago

#5129 closed Bugs

Doesn't handle alignment correctly — at Version 2

Reported by: anonymous Owned by: Peter Dimov
Milestone: To Be Determined Component: bind
Version: Boost 1.44.0 Severity: Problem
Keywords: Cc:

Description (last modified by viboes)

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 ).

Change History (2)

comment:1 by anonymous, 12 years ago

Version: Boost 1.45.0Boost 1.44.0

comment:2 by viboes, 10 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.