Added allocator back to template definitions to work with boost library.