diff options
| author | tv <tv@NetBSD.org> | 2001-04-23 11:57:48 +0000 |
|---|---|---|
| committer | tv <tv@NetBSD.org> | 2001-04-23 11:57:48 +0000 |
| commit | f54fbfcb7509bdf24aaa2b7113d91eb4bfe0fb17 (patch) | |
| tree | c599acdd7b265e6fe82d2b45a658f0b64a9b2bf2 /gnu/dist/toolchain/libstdc++/std | |
| parent | 1220abdf9e6fa1477d366149d3b1a7df6c184a3a (diff) | |
Import gcc 2.95.3.
Diffstat (limited to 'gnu/dist/toolchain/libstdc++/std')
| -rw-r--r-- | gnu/dist/toolchain/libstdc++/std/bastring.cc | 10 | ||||
| -rw-r--r-- | gnu/dist/toolchain/libstdc++/std/bastring.h | 11 | ||||
| -rw-r--r-- | gnu/dist/toolchain/libstdc++/std/complext.cc | 2 | ||||
| -rw-r--r-- | gnu/dist/toolchain/libstdc++/std/valarray_array.h | 2 | ||||
| -rw-r--r-- | gnu/dist/toolchain/libstdc++/std/valarray_meta.h | 7 |
5 files changed, 18 insertions, 14 deletions
diff --git a/gnu/dist/toolchain/libstdc++/std/bastring.cc b/gnu/dist/toolchain/libstdc++/std/bastring.cc index 3093b9e129d..f86f6d30157 100644 --- a/gnu/dist/toolchain/libstdc++/std/bastring.cc +++ b/gnu/dist/toolchain/libstdc++/std/bastring.cc @@ -1,5 +1,5 @@ // Member templates for the -*- C++ -*- string classes. -// Copyright (C) 1994 Free Software Foundation +// Copyright (C) 1994, 1999 Free Software Foundation // This file is part of the GNU ANSI C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -94,14 +94,14 @@ check_realloc (basic_string::size_type s) const template <class charT, class traits, class Allocator> void basic_string <charT, traits, Allocator>:: -alloc (basic_string::size_type size, bool save) +alloc (basic_string::size_type __size, bool __save) { - if (! check_realloc (size)) + if (! check_realloc (__size)) return; - Rep *p = Rep::create (size); + Rep *p = Rep::create (__size); - if (save) + if (__save) { p->copy (0, data (), length ()); p->len = length (); diff --git a/gnu/dist/toolchain/libstdc++/std/bastring.h b/gnu/dist/toolchain/libstdc++/std/bastring.h index 70891262e96..bbe873085ea 100644 --- a/gnu/dist/toolchain/libstdc++/std/bastring.h +++ b/gnu/dist/toolchain/libstdc++/std/bastring.h @@ -1,5 +1,5 @@ // Main templates for the -*- C++ -*- string classes. -// Copyright (C) 1994, 1995 Free Software Foundation +// Copyright (C) 1994, 1995, 1999 Free Software Foundation // This file is part of the GNU ANSI C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -180,11 +180,11 @@ public: : dat (nilRep.grab ()) { assign (n, c); } #ifdef __STL_MEMBER_TEMPLATES template<class InputIterator> - basic_string(InputIterator begin, InputIterator end) + basic_string(InputIterator __begin, InputIterator __end) #else - basic_string(const_iterator begin, const_iterator end) + basic_string(const_iterator __begin, const_iterator __end) #endif - : dat (nilRep.grab ()) { assign (begin, end); } + : dat (nilRep.grab ()) { assign (__begin, __end); } ~basic_string () { rep ()->release (); } @@ -208,6 +208,9 @@ public: #endif { return replace (iend (), iend (), first, last); } + void push_back(charT __c) + { append(1, __c); } + basic_string& assign (const basic_string& str, size_type pos = 0, size_type n = npos) { return replace (0, npos, str, pos, n); } diff --git a/gnu/dist/toolchain/libstdc++/std/complext.cc b/gnu/dist/toolchain/libstdc++/std/complext.cc index d50bf0871f6..60227f21329 100644 --- a/gnu/dist/toolchain/libstdc++/std/complext.cc +++ b/gnu/dist/toolchain/libstdc++/std/complext.cc @@ -236,7 +236,7 @@ pow (const complex<FLOAT>& xin, int y) if (y < 0) { y = -y; - x = 1/x; + x = FLOAT(1)/x; } for (;;) { diff --git a/gnu/dist/toolchain/libstdc++/std/valarray_array.h b/gnu/dist/toolchain/libstdc++/std/valarray_array.h index f711e52a165..a0b5818fd8b 100644 --- a/gnu/dist/toolchain/libstdc++/std/valarray_array.h +++ b/gnu/dist/toolchain/libstdc++/std/valarray_array.h @@ -73,7 +73,7 @@ template<typename _Tp> inline void __valarray_copy (const _Tp* __restrict__ __a, size_t __n, size_t __s, _Tp* __restrict__ __b) -{ for (size_t __i=0; __i<__n; ++__i, ++__b, __a += __s) *__b += *__a; } +{ for (size_t __i=0; __i<__n; ++__i, ++__b, __a += __s) *__b = *__a; } // copy plain __a[<__n>] in strided __b[<__n : __s>] template<typename _Tp> diff --git a/gnu/dist/toolchain/libstdc++/std/valarray_meta.h b/gnu/dist/toolchain/libstdc++/std/valarray_meta.h index f799111c7bc..48fb21371f7 100644 --- a/gnu/dist/toolchain/libstdc++/std/valarray_meta.h +++ b/gnu/dist/toolchain/libstdc++/std/valarray_meta.h @@ -449,7 +449,7 @@ struct _BinClos<_Oper,_ValArray,_Expr,typename _Dom::value_type,_Dom> typedef _BinBase<_Oper,valarray<_Tp>,_Dom> _Base; typedef typename _Base::value_type value_type; - _BinClos (const valarray<_Tp> __e1, const _Dom& __e2) + _BinClos (const valarray<_Tp>& __e1, const _Dom& __e2) : _Base (__e1, __e2) {} }; @@ -917,7 +917,7 @@ _Name(const _Expr<_Dom,typename _Dom::value_type>& __e) \ { \ typedef typename _Dom::value_type _Tp; \ typedef _UnFunClos<_Expr,_Dom> _Closure; \ - return _Expr<_Closure,_Tp> (_Closure (__e, (_Tp(*)(_Tp))(&_Name))); \ + return _Expr<_Closure,_Tp>(_Closure(__e(), (_Tp(*)(_Tp))(&_Name))); \ } \ \ template<typename _Tp> \ @@ -936,7 +936,8 @@ _Name(const valarray<_Tp>& __v) \ _DEFINE_EXPR_UNARY_FUNCTION(sin) _DEFINE_EXPR_UNARY_FUNCTION(asin) _DEFINE_EXPR_UNARY_FUNCTION(sinh) - _DEFINE_EXPR_UNARY_FUNCTION(tan) + _DEFINE_EXPR_UNARY_FUNCTION(tan) + _DEFINE_EXPR_UNARY_FUNCTION(tanh) _DEFINE_EXPR_UNARY_FUNCTION(atan) _DEFINE_EXPR_UNARY_FUNCTION(exp) _DEFINE_EXPR_UNARY_FUNCTION(log) |
