From 8865bf80eeef29f6094b120cf7a32e22c868b76d Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Sat, 24 Jan 2004 12:32:54 +0000 Subject: [PATCH] basic_string.h (insert(size_type, const basic_string&, size_type, size_type)): Define inline here. 2004-01-24 Paolo Carlini * include/bits/basic_string.h (insert(size_type, const basic_string&, size_type, size_type)): Define inline here. * include/bits/basic_string.tcc (insert(size_type, const basic_string&, size_type, size_type)): Move inline. From-SVN: r76509 --- libstdc++-v3/ChangeLog | 7 +++++++ libstdc++-v3/include/bits/basic_string.h | 5 ++++- libstdc++-v3/include/bits/basic_string.tcc | 11 ----------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 2f1da9e..01e3dc2 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,12 @@ 2004-01-24 Paolo Carlini + * include/bits/basic_string.h (insert(size_type, + const basic_string&, size_type, size_type)): Define inline here. + * include/bits/basic_string.tcc (insert(size_type, + const basic_string&, size_type, size_type)): Move inline. + +2004-01-24 Paolo Carlini + * include/bits/basic_string.h (assign(const basic_string&, size_type, size_type)): Define inline here. (replace(size_type, size_type, const basic_string&, diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index 9e37583..eb160d3 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++ b/libstdc++-v3/include/bits/basic_string.h @@ -920,7 +920,10 @@ namespace std */ basic_string& insert(size_type __pos1, const basic_string& __str, - size_type __pos2, size_type __n); + size_type __pos2, size_type __n) + { return this->insert(__pos1, __str._M_data() + + __str._M_check(__pos2, "basic_string::insert"), + __str._M_limit(__pos2, __n)); } /** * @brief Insert a C substring. diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc index a7638df..01919a4 100644 --- a/libstdc++-v3/include/bits/basic_string.tcc +++ b/libstdc++-v3/include/bits/basic_string.tcc @@ -295,17 +295,6 @@ namespace std template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: - insert(size_type __pos1, const basic_string& __str, - size_type __pos2, size_type __n) - { - return this->insert(__pos1, __str._M_data() - + __str._M_check(__pos2, "basic_string::insert"), - __str._M_limit(__pos2, __n)); - } - - template - basic_string<_CharT, _Traits, _Alloc>& - basic_string<_CharT, _Traits, _Alloc>:: insert(size_type __pos, const _CharT* __s, size_type __n) { __glibcxx_requires_string_len(__s, __n); -- 2.7.4