diff options
author | Karl Berry <karl@freefriends.org> | 2011-05-28 02:18:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-05-28 02:18:52 +0000 |
commit | c59fe5fe4739f0c61560f05d4e42b4e552219b27 (patch) | |
tree | 8cf79e85e394b3177a28d374415840a4e0a025ad /Build/source/utils/asymptote/memory.h | |
parent | 771db15706dbf3f4af8b630dcb15646a3e5fda00 (diff) |
asy 2.10
git-svn-id: svn://tug.org/texlive/trunk@22633 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/memory.h')
-rw-r--r-- | Build/source/utils/asymptote/memory.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/Build/source/utils/asymptote/memory.h b/Build/source/utils/asymptote/memory.h index 6f91095fb52..ccf0436c500 100644 --- a/Build/source/utils/asymptote/memory.h +++ b/Build/source/utils/asymptote/memory.h @@ -121,13 +121,17 @@ template <typename T, typename Container = vector<T> > struct stack : public std::stack<T, Container>, public gc { }; +#define PAIR_ALLOC gc_allocator<std::pair<CONST Key,T> > /* space */ + #undef GC_CONTAINER #define GC_CONTAINER(KIND) \ - template <typename Key, typename T, typename Compare = std::less<Key> > \ - struct KIND : public \ - std::KIND<Key,T,Compare,gc_allocator<std::pair<Key,T> > >, public gc { \ - KIND() : std::KIND<Key,T,Compare,gc_allocator<std::pair<Key,T> > > () {} \ + template <typename Key, \ + typename T, \ + typename Compare = std::less<Key> > \ + struct KIND : public std::KIND<Key,T,Compare,PAIR_ALLOC>, public gc \ + { \ + KIND() : std::KIND<Key,T,Compare,PAIR_ALLOC> () {} \ } GC_CONTAINER(map); @@ -141,10 +145,10 @@ GC_CONTAINER(multimap); typename Hash = EXT::hash<Key>, \ typename Eq = std::equal_to<Key> > \ struct KIND : public \ - EXT::KIND<Key,T,Hash,Eq,gc_allocator<std::pair<Key, T> > >, public gc { \ - KIND() : EXT::KIND<Key,T,Hash,Eq,gc_allocator<std::pair<Key, T> > > () {} \ + EXT::KIND<Key,T,Hash,Eq,PAIR_ALLOC>, public gc { \ + KIND() : EXT::KIND<Key,T,Hash,Eq,PAIR_ALLOC> () {} \ KIND(size_t n) \ - : EXT::KIND<Key,T,Hash,Eq,gc_allocator<std::pair<Key, T> > > (n) {} \ + : EXT::KIND<Key,T,Hash,Eq,PAIR_ALLOC> (n) {} \ } GC_CONTAINER(unordered_map); @@ -154,6 +158,8 @@ GC_CONTAINER(unordered_multimap); #undef EXT #endif +#undef PAIR_ALLOC + #ifdef USEGC typedef std::basic_string<char,std::char_traits<char>, gc_allocator<char> > string; |