Skip to content

Commit

Permalink
allocator now supports emplace construction
Browse files Browse the repository at this point in the history
  • Loading branch information
kibergus committed Sep 2, 2012
1 parent 85e48ad commit 9d0927a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 55 deletions.
1 change: 0 additions & 1 deletion char_traits
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <basic_definitions>
#include <string.h>
#include <exception>
#include <memory>

#ifdef __UCLIBCXX_HAS_WCHAR__
#include <cwchar>
Expand Down
53 changes: 0 additions & 53 deletions forward.h

This file was deleted.

5 changes: 5 additions & 0 deletions memory
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ public:

//Use placement new to engage the constructor
void construct(pointer p, const T& val) { new((void*)p) T(val); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
template<typename... Args>
void construct(pointer p, Args&&... args)
{ ::new((void *)p) T(forward<Args>(args)...); }
#endif
void destroy(pointer p){ ((T*)p)->~T(); } //Call destructor

size_type max_size() const throw();
Expand Down
1 change: 0 additions & 1 deletion type_traits
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <basic_definitions>
#include <string.h>
#include <exception>
#include <memory>
#include <char_traits>

#ifndef __HEADER_TYPE_TRAITS
Expand Down

0 comments on commit 9d0927a

Please sign in to comment.