Why is allocator::construct() called with one argument for '--std=c++0x'?

Syncopated joshchia@gmail.com
Thu Nov 10 23:49:00 GMT 2011


I'm using gcc 4.6.2. I tried to compile a program involving TBB 3.0 with the
following line and got a compilation error.

vector<int, tbb::cache_aligned_allocator<int> > values(0);

It turns out that  bits/stl_uninitialized.h is calling
allocator::construct() with only one argument, and
tbb::cache_aligned_allocator doesn't define it. AFAIK, construct() takes two
arguments. Is this something new in C++11, that construct() can take one
argument?

-- 
View this message in context: http://old.nabble.com/Why-is-allocator%3A%3Aconstruct%28%29-called-with-one-argument-for-%27--std%3Dc%2B%2B0x%27--tp32822784p32822784.html
Sent from the gcc - libstdc++ mailing list archive at Nabble.com.



More information about the Libstdc++ mailing list