… | |
… | |
82 | |
82 | |
83 | static void construct (iterator a, size_type n = 1) |
83 | static void construct (iterator a, size_type n = 1) |
84 | { |
84 | { |
85 | if (!is_simple_enough ()) |
85 | if (!is_simple_enough ()) |
86 | while (n--) |
86 | while (n--) |
87 | new (*a++) T (); |
87 | new (a++) T (); |
88 | } |
88 | } |
89 | |
89 | |
90 | static void destruct (iterator a, size_type n = 1) |
90 | static void destruct (iterator a, size_type n = 1) |
91 | { |
91 | { |
92 | if (!is_simple_enough ()) |
92 | if (!is_simple_enough ()) |
… | |
… | |
152 | iterator src = buf + pos; |
152 | iterator src = buf + pos; |
153 | if (is_simple_enough ()) |
153 | if (is_simple_enough ()) |
154 | memmove (src + n, src, sizeof (T) * n); |
154 | memmove (src + n, src, sizeof (T) * n); |
155 | else |
155 | else |
156 | for (size_type i = n; i--; ) |
156 | for (size_type i = n; i--; ) |
157 | op (src + n + i, src + i); |
157 | cop_set (src + n + i, src + i); |
158 | } |
158 | } |
159 | |
159 | |
160 | public: |
160 | public: |
161 | size_type capacity () const { return res; } |
161 | size_type capacity () const { return res; } |
162 | size_type size () const { return sze; } |
162 | size_type size () const { return sze; } |