我正在尝试使用 __m128i 作为 GCC 的缓存对齐向量的值类型,但出现以下错误:
/usr/include/tbb/cache_aligned_allocator.h:105:32: 错误:请求成员 '~tbb::cache_aligned_allocator<__vector(2) long long int>::value_type' in '* p', 这是非类类型 'tbb::cache_aligned_allocator<__vector(2) long long int>::value_type {aka __vector(2) long long int}'</p>
编译器将其跟踪到 tbb/cache_aligned_allocator.h 中的以下行:
void destroy( pointer p ) {p->~value_type();}
以下是触发编译器错误的代码:
#include <vector>
#include <emmintrin.h>
#include <tbb/cache_aligned_allocator.h>
int main()
{
std::vector<int, tbb::cache_aligned_allocator<int> > success;
std::vector<__m128i, tbb::cache_aligned_allocator<__m128i> > failure;
return 0;
}
根据Debian版本,我的GCC版本是4.6.1-2,我的TBB版本是3.0+r147-1。这是线程构建块中的错误,还是我滥用了某些东西?