Added some code to workaround a bug in certain versions of gcc.

This commit is contained in:
Davis King 2012-12-05 19:29:38 -05:00
parent dc78fef6cb
commit 82463617ee
1 changed files with 5 additions and 0 deletions

View File

@ -91,6 +91,11 @@ namespace dlib
return (pointer) pool.allocate_array(num*sizeof(T)); return (pointer) pool.allocate_array(num*sizeof(T));
} }
// This function is not required by the C++ standard but some versions of the STL
// distributed with gcc erroneously require it. See the bug report for further
// details: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51626
void construct(pointer p) { return construct(p, value_type()); }
//initialize elements of allocated storage p with value value //initialize elements of allocated storage p with value value
void construct (pointer p, const T& value) void construct (pointer p, const T& value)
{ {