Opened 12 years ago

Last modified 9 years ago

#5129 closed Bugs

Doesn't handle alignment correctly — at Initial Version

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

Description

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 (0)

Note: See TracTickets for help on using tickets.