summaryrefslogtreecommitdiffstats
path: root/libcxx/include/__split_buffer
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2010-07-07 19:14:52 +0000
committerHoward Hinnant <hhinnant@apple.com>2010-07-07 19:14:52 +0000
commit189b212662b1f35e4e77da212338e06d69db0e8a (patch)
tree462766a671a994a93983c0fe31118b7c5d163348 /libcxx/include/__split_buffer
parenta6243587282a90104496f670d45f60a46f66c069 (diff)
downloadbcm5719-llvm-189b212662b1f35e4e77da212338e06d69db0e8a.tar.gz
bcm5719-llvm-189b212662b1f35e4e77da212338e06d69db0e8a.zip
First loop test passed. The data structure and search algorithm is still crude and in-flux. But this milestone needed to be locked in. Right now every loop is implemented in terms of a structure that will handle the most complicated {min, max} loop. Though only *-loops are tested at the moment. In a future iteration *-loops will likely be optimized a little more. The only tests are for basic posix so far, but I have prototype code running for extended posix and ecma. The prototype code lacks the complicating properties of the real <regex> requirements though.
llvm-svn: 107803
Diffstat (limited to 'libcxx/include/__split_buffer')
-rw-r--r--libcxx/include/__split_buffer6
1 files changed, 3 insertions, 3 deletions
diff --git a/libcxx/include/__split_buffer b/libcxx/include/__split_buffer
index 1a7c623204f..efcf7ed7dcd 100644
--- a/libcxx/include/__split_buffer
+++ b/libcxx/include/__split_buffer
@@ -18,7 +18,7 @@ protected:
void __throw_out_of_range() const;
};
-template <class _Tp, class _Allocator>
+template <class _Tp, class _Allocator = allocator<_Tp> >
struct __split_buffer
: private __split_buffer_common<true>
{
@@ -497,7 +497,7 @@ __split_buffer<_Tp, _Allocator>::push_front(const_reference __x)
else
{
size_type __c = max<size_type>(2 * (__end_cap() - __first_), 1);
- __split_buffer<value_type, __alloc_rr&> __t(__c, (__c + 2) / 4, __alloc());
+ __split_buffer<value_type, __alloc_rr&> __t(__c, (__c + 3) / 4, __alloc());
__t.__construct_at_end(move_iterator<pointer>(__begin_),
move_iterator<pointer>(__end_));
_STD::swap(__first_, __t.__first_);
@@ -528,7 +528,7 @@ __split_buffer<_Tp, _Allocator>::push_front(value_type&& __x)
else
{
size_type __c = max<size_type>(2 * (__end_cap() - __first_), 1);
- __split_buffer<value_type, __alloc_rr&> __t(__c, (__c + 2) / 4, __alloc());
+ __split_buffer<value_type, __alloc_rr&> __t(__c, (__c + 3) / 4, __alloc());
__t.__construct_at_end(move_iterator<pointer>(__begin_),
move_iterator<pointer>(__end_));
_STD::swap(__first_, __t.__first_);
OpenPOWER on IntegriCloud