diff options
Diffstat (limited to 'include/ocl/tproc/detail/rope_fwd.inl')
| -rw-r--r-- | include/ocl/tproc/detail/rope_fwd.inl | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/include/ocl/tproc/detail/rope_fwd.inl b/include/ocl/tproc/detail/rope_fwd.inl index 1d282bb..6951b20 100644 --- a/include/ocl/tproc/detail/rope_fwd.inl +++ b/include/ocl/tproc/detail/rope_fwd.inl @@ -12,17 +12,21 @@ namespace ocl::tproc template <class CharT, class Traits, class Allocator> struct basic_rope<CharT, Traits, Allocator>::tree_impl { - size_t size_; - CharT *head_, tail_; + private: + std::allocator_traits<Allocator>::size_type size_; + CharT *head_, tail_{}; - size_t size() + public: + std::allocator_traits<Allocator>::size_type size() { return size_; } + CharT* begin() { return head_; } + CharT* end() { return tail_; @@ -53,6 +57,20 @@ namespace ocl::tproc } template <class CharT, class Traits, class Allocator> + basic_rope<CharT, Traits, Allocator>& + basic_rope<CharT, Traits, Allocator>::operator=(basic_rope&& other) + { + impl_ = std::exchange(other.impl_); + return *this; + } + + template <class CharT, class Traits, class Allocator> + basic_rope<CharT, Traits, Allocator>::basic_rope(basic_rope&& other) + { + impl_ = std::exchange(other.impl_); + } + + template <class CharT, class Traits, class Allocator> basic_rope<CharT, Traits, Allocator>::basic_rope( const boost::core::basic_string_view<CharT>& in) : impl_(new tree_impl()) @@ -81,7 +99,7 @@ namespace ocl::tproc template <class CharT, class Traits, class Allocator> bool basic_rope<CharT, Traits, Allocator>::empty() const { - return impl_->size() < 1; + return impl_->size() < 1UL; } } // namespace ocl::tproc |
