Commit Graph

39 Commits

Author SHA1 Message Date
Gabriel Dos Reis
aae3f0dafd valarray_array.h (__valarray_sum): Make inline.
2000-07-17  Gabriel Dos Reis  <gdr@codesourcery.com>

	* std/valarray_array.h(__valarray_sum): Make inline.

From-SVN: r35071
2000-07-17 08:20:06 +00:00
Gabriel Dos Reis
5b2ff385d5 valarray_array.h (__valarray_get_memory, [...]): New functions.
2000-07-15  Gabriel Dos Reis  <gdr@codesourcery.com>

	* std/valarray_array.h (__valarray_get_memory,
	__valarray_get_storage, __valarray_release_storage): New
	functions.
	(_Array_default_ctor, _Array_init_ctor, _Array_copy_ctor,
	_Array_copier): New traits classes.
	(__valarray_default_construct): New function.  Implements valarray
	default construction.
	(__valarray_fill_construct): New function. Implements valarray
	construction with initializer.
	(__valarray_copy_construct): New function.  Implements valarray
	copy construction.
	(__valarray_destroy_elements): New function.
	(__valarray_copy, __valarray_fill): Tweak.
	(__valarray_sum, __valarray_product): New helper functions.
	(_Array<>::free_data): Remove.
	(_Array<>::_Array): Tweak.

	* std/std_valarray.h (valarray<>::product): Remove.
	(valarray<>::valarray): Use __valarray_get_storage.
	(valarray<>::shift, valarray<>::cshift, valarray<>::resize):
	Tweak.

	* std/cpp_type_traits.h: New file.

	* valarray.cc (multiplies<>, accumulate, valarray<>::product):
	Remove explicit instantiation.
	(__valarray_product): New function.
	(_Indexer::_Indexer): Use.

From-SVN: r35055
2000-07-15 21:54:06 +00:00
Jean-Francois Panisset
30f747d077 * std/bastring.h (basic_string<>::clear): Add function.
From-SVN: r35035
2000-07-14 16:27:45 +00:00
Zack Weinberg
774c79ed27 gslice_array.h, [...]: Do not paste anything after 'operator' keyword.
* std/gslice_array.h, std/indirect_array.h, std/mask_array.h,
	std/slice_array.h, std/std_valarray.h, std/valarray_meta.h:
	Do not paste anything after 'operator' keyword.

From-SVN: r34890
2000-07-06 17:42:14 +00:00
Gabriel Dos Reis
e5fd03ba40 bastring.h (basic_string<>::push_back): Was missing.
2000-03-10  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>

        * std/bastring.h (basic_string<>::push_back): Was missing.

From-SVN: r32474
2000-03-10 21:20:08 +00:00
Martin v. Löwis
035f4506b1 back out unrelated patch to std:: qualify reverse_iterator
From-SVN: r30940
1999-12-15 07:43:22 +00:00
Martin v. Löwis
355e94aaeb bastring.h (basic_string::basic_string): Rename parameters to avoid shadow warnings.
* std/bastring.h (basic_string::basic_string): Rename parameters
	to avoid shadow warnings.
	* std/bastring.cc (alloc): Likewise.

From-SVN: r30938
1999-12-15 07:37:36 +00:00
Jakub Jelinek
d5191c94d1 bastring.h (class basic_string::Rep): Use proper defines for sparc v9 and fix asm for sparc64.
* std/bastring.h (class basic_string::Rep): Use proper defines
	for sparc v9 and fix asm for sparc64.

From-SVN: r30906
1999-12-14 09:48:11 +01:00
Gabriel Dos Reis
9c5c5c8a31 valarray_meta.h (_DEFINE_EXPR_UNARY_FUNCTION): Don't forget to define tanh.
1999-11-19  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>

        * std/valarray_meta.h (_DEFINE_EXPR_UNARY_FUNCTION): Don't forget
        to define tanh.

From-SVN: r30580
1999-11-19 01:40:12 +00:00
Gabriel Dos Reis
36a6e29fbb valarray_meta.h (_DEFINE_EXPR_UNARY_FUNCTION): When building meta-expressions don't forget to take the contained closures.
1999-11-05  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>

        * std/valarray_meta.h (_DEFINE_EXPR_UNARY_FUNCTION):  When
        building meta-expressions don't forget to take the contained
        closures.

From-SVN: r30424
1999-11-05 22:26:12 +00:00
Gabriel Dos Reis
172d33bca7 valarray_meta.h: (_BinClos::_BinClos): Fix typo.
1999-10-19  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>

        * std/valarray_meta.h: (_BinClos::_BinClos): Fix typo.

From-SVN: r30092
1999-10-19 22:10:36 +00:00
Gabriel Dos Reis
80d789a4d5 1999-09017 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
* std/valarray_array.h (__valarray_copy): Fix typo.

From-SVN: r29476
1999-09-17 15:19:20 +00:00
Gabriel Dos Reis
fcc32134a0 complext.cc (pow): Don't expect floating point promotion in presence of template argument deduction.
1999-09-17 Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>

        * std/complext.cc (pow): Don't expect floating point promotion
        in presence of template argument deduction.  There is no such
        thing.

From-SVN: r29474
1999-09-17 09:08:26 +00:00
Gabriel Dos Reis
3653bb9997 * std/std_valarray.h: Don't #include unconditionally <alloca.h>
From-SVN: r27364
1999-06-05 09:41:22 +00:00
Gabriel Dos Reis
27ac1891d2 std_valarray.h: New file.
* std/std_valarray.h: New file.
 	* std/slice.h: New file.
	* std/slice_array.h: New file.
	* std/gslice.h: New file.
	* std/gslice_array.h: New file.
	* std/mask_array.h: New file.
	* std/indirect_array.h: New file.
	* std/valarray_array.h: New file.
	* std/valarray_array.tcc: New file.
	* std/valarray_meta.h: New file.
	* valarray.cc: New file.
	* valarray: New file
	* Makefile.in (OBJS): add valarray.o
	(HEADERS): add valarray
	(valarray.o): define dependency on valarray.cc
	(install): make it possible to install valarray files.

From-SVN: r27354
1999-06-04 19:35:36 +00:00
Robert Lipe
73f3aa96d2 bastring.h (class basic_string:Rep): Encode xlock opcode as .bytes instead of mnemonics.
Wed Jun  2 00:21:54 1999  Robert Lipe  <robertlipe@usa.net>
        * std/bastring.h (class basic_string:Rep): Encode xlock opcode
        as .bytes instead of mnemonics.

From-SVN: r27295
1999-06-01 17:27:14 -06:00
Ulrich Drepper
4ff8ec301f (class basic_string::Rep): Make release member function thread-safe for
ix86 (x>=4) and UltraSPARC.

From-SVN: r26820
1999-05-07 10:16:09 +00:00
Jeffrey A Law
477d3dbc51 string, [...]: Revert recent change.
* string, std/straits.h, std/bastring.h: Revert recent change.  Needs
        some libiberty support before it can be re-enabled.

From-SVN: r25336
1999-02-20 05:21:51 -07:00
Baron Roberts
f40179f2ec Remove #if 0/#endif from around struct string_char_traits <wchar_t>.
#include <cwchar>.
Add missing definition for wchar_t move method.
Add empty() method for trait-based empty string return.

From-SVN: r25247
1999-02-16 11:58:35 +00:00
Baron Roberts
ce03e9e15a (c_str): Change return of "" to return of traits::empty() call so that proper...
(c_str): Change return of "" to return of traits::empty() call so that
proper empty string is returned based on the character type (i.e. ""
or L"").

From-SVN: r25246
1999-02-16 11:58:18 +00:00
Ulrich Drepper
a66e687475 (operator>>): Correct cast in last patch.
(getline): Likewise.

From-SVN: r24011
1998-11-30 09:40:56 +00:00
Ulrich Drepper
c5670ac6fa (operator>>): Cast new character to char before adding to string.
(getline): Likewise.

From-SVN: r23786
1998-11-23 09:21:12 +00:00
Jason Merrill
eda600e865 Makefile.in (VERSION): Bump to 2.9.0.
* Makefile.in (VERSION): Bump to 2.9.0.
	* std/bastring.cc (find_last_of): Fix.
	(find_last_not_of): Likewise.

From-SVN: r21072
1998-07-11 22:20:51 -04:00
Ulrich Drepper
64e1d44458 (class basic_string): Correct iterator return values in insert member
functions.

From-SVN: r20950
1998-07-06 10:35:56 +00:00
Ulrich Drepper
5a1a4615e4 (class basic_string): Return correct iterators in erase member functions.
From-SVN: r20906
1998-07-02 15:57:12 +00:00
Jeff Law
fc438e2ad0 [multiple changes]
Tue Mar 24 10:13:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
        * std/bastring.cc (basic_string::copy): Mark const here, too.
1998-03-23 15:59  Ulrich Drepper  <drepper@cygnus.com>
        * std/bastring.h (basic_string::copy): Mark copy function as const.
        Reported by Scott Schurr <scotts@ims.com>.
Bring over from devo.

From-SVN: r19684
1998-05-11 16:04:43 -06:00
Jason Merrill
5f79cea1ef bastring.h (unique): We only need length bytes.
* std/bastring.h (unique): We only need length bytes.
	(c_str): Avoid writing over random memory.
	#include <std/bastring.cc>.
	Lose _G_ALLOC_CONTROL.
	* std/bastring.cc: Likewise.
 	(nilRep): Add initializer for selfish.
	* sinst.cc: Just #include <string>.
Fix a couple of bugs, linux undefined symbol problem.

From-SVN: r17478
1998-01-25 11:45:02 -05:00
Brendan Kehoe
b450b6999c bastring.cc (basic_string::Rep::operator delete): Don't claim to return from deallocate, since this is a void method.
* std/bastring.cc (basic_string::Rep::operator delete): Don't claim
	to return from deallocate, since this is a void method.

From-SVN: r17297
1998-01-05 13:35:07 -05:00
Jody Goldberg
4ef0de1177 bastring.h: Move closer to the draft standard implementation of basic_string by adding 3...
Sun Dec  7 02:34:40 1997  Jody Goldberg	<jodyg@idt.net>

	* libstdc++/std/bastring.h : Move closer to the draft standard
	implementation of basic_string by adding 3 paramter 'Allocator'.
	NOTE: this still differs from the standard in not offering per
	instance allocators.
	* libstdc++/std/bastring.cc : Likewise.
	* libstdc++/stlinst.cc : Handle thread safe allocators if they are the
	default.

From-SVN: r16993
1997-12-07 05:41:01 -05:00
Jason Merrill
f4f3e8fdf7 London changes to string:
* std/bastring.cc (check_realloc): Don't be selfish anymore.
	* std/bastring.h (non-const operator[]): Be selfish.
	(iterator forms of insert and erase): Stay selfish.

From-SVN: r16722
1997-11-26 02:19:11 -05:00
Jason Merrill
9cd60aa99b bastring.h: Use ibegin internally.
* std/bastring.h: Use ibegin internally.  Return passed iterator
	instead of recalculating it were appropriate.
	* std/bastring.cc: Adjust for erase.

	From Yotam Medini:
	* std/bastring.h: Replace remove with erase.

From-SVN: r15887
1997-10-10 03:44:56 -04:00
Jason Merrill
da8c445d07 stdexcepti.cc (__out_of_range): New fn.
* stdexcepti.cc (__out_of_range): New fn.
	(__length_error): New fn.

	* std/bastring.h (OUTOFRANGE): Fix logic.  Use throwing functions.
	(LENGTHERROR): Likewise.
	Revert Oct 2 changes.
	* string: Revert Oct 2 changes.

	* std/{f,d,ld}complex.h: Replace guiding fns if not -ansi.

From-SVN: r15885
1997-10-10 02:56:56 -04:00
Jason Merrill
b6aa195e20 bastring.h: Move exception stuff after definition of string.
* std/bastring.h: Move exception stuff after definition of string.
	Move typedef of string here.
	* string: From here.

From-SVN: r15832
1997-10-02 13:26:16 -04:00
Jason Merrill
905a881f36 [multiple changes]
Sat Sep 27 16:48:00 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* std/complext.h: Lose injection decls.
	* std/fcomplex.h: Likewise.
	* std/dcomplex.h: Likewise.
	* std/ldcomplex.h: Likewise.

Sat Sep 27 16:47:35 1997  Mark Mitchell  <mmitchell@usa.net>

	* std/complext.h: Declare templates before making them
	friends.  Use new friend <> syntax.
	* std/complext.cc: Don't rely on guiding declarations.
	* std/fcomplex.h: Use new friend <> syntax.
	* std/dcomplex.h: Likewise.
	* std/ldcomplex.h: Likewise.

From-SVN: r15776
1997-09-28 15:21:52 -04:00
Jason Merrill
5a4a879c40 bastring.h: Enable exceptions.
* std/bastring.h: Enable exceptions.
 	(assign, append, insert, replace): Implement member template versions.

	* tstring.cc: Add some tests for the member templates.

From-SVN: r15717
1997-09-25 23:01:01 -04:00
Jason Merrill
2a32969dd4 bastring.h (class basic_string): Add global scope to use of reverse_iterator.
* std/bastring.h (class basic_string): Add global scope to
	use of reverse_iterator.

From-SVN: r15423
1997-09-11 21:56:59 -04:00
Jason Merrill
f12bc7b53d * std/bastring.h: Adjust use of reverse_iterator template.
From-SVN: r15212
1997-09-09 22:51:35 -04:00
Jason Merrill
3e68fa8311 [multiple changes]
Mon Aug 25 14:26:45 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* Makefile.in (CXXFLAGS): Add -Weffc++.

Sat Aug 23 21:25:37 1997  Mark Mitchell  <mmitchell@usa.net>

	* bastring.h: Enable reverse_iterator and its ilk.

	* bastring.h: Provide specializations of member function templates
	for const_iterator.

From-SVN: r14922
1997-08-25 20:27:06 -04:00
Jason Merrill
6599da043e Initial revision
From-SVN: r14877
1997-08-21 18:57:35 -04:00