std_fstream.h: Remove duplicate typdefs for ofstream and wofstream...

2000-08-14  Levente Farkas  <lfarkas@mindmaker.hu>

	* bits/std_fstream.h: Remove duplicate typdefs for ofstream and
	wofstream, filebuf, wfilebuf, fstream, wfstream.
	* bits/std_streambuf.h: Same for streambuf, wstreambuf.
	* bits/std_sstream.h: Same for stringstream and wstringstream.
	Same for stringbuf, wstringbuf, istringstream, wistringstream,
	ostringstream, wostringstream.

	* testsuite/26_numerics/valarray.cc: Add test.

From-SVN: r35681
This commit is contained in:
Levente Farkas 2000-08-14 21:46:44 +02:00 committed by Benjamin Kosnik
parent 57119aa9eb
commit 5312a1d9d1
5 changed files with 51 additions and 22 deletions

View File

@ -1,3 +1,14 @@
2000-08-14 Levente Farkas <lfarkas@mindmaker.hu>
* bits/std_fstream.h: Remove duplicate typdefs for ofstream and
wofstream, filebuf, wfilebuf, fstream, wfstream.
* bits/std_streambuf.h: Same for streambuf, wstreambuf.
* bits/std_sstream.h: Same for stringstream and wstringstream.
Same for stringbuf, wstringbuf, istringstream, wistringstream,
ostringstream, wostringstream.
* testsuite/26_numerics/valarray.cc: Add test.
2000-08-14 Zack Weinberg <zack@wolery.cumb.org>
* configure: Regenerate after change to ../libtool.m4.

View File

@ -228,8 +228,6 @@ namespace std {
_M_output_unshift();
};
typedef basic_filebuf<char> filebuf;
typedef basic_filebuf<wchar_t> wfilebuf;
// 27.8.1.5 Template class basic_ifstream
template<typename _CharT, typename _Traits>
@ -285,6 +283,7 @@ namespace std {
this->setstate(ios_base::failbit);
}
};
// 27.8.1.8 Template class basic_ofstream
template<typename _CharT, typename _Traits>
@ -343,9 +342,6 @@ namespace std {
}
};
typedef basic_ofstream<char> ofstream;
typedef basic_ofstream<wchar_t> wofstream;
// 27.8.1.11 Template class basic_fstream
template<typename _CharT, typename _Traits>
@ -405,9 +401,6 @@ namespace std {
}
};
typedef basic_fstream<char> fstream;
typedef basic_fstream<wchar_t> wfstream;
} // namespace std

View File

@ -183,9 +183,6 @@ namespace std {
}
};
typedef basic_stringbuf<char> stringbuf;
typedef basic_stringbuf<wchar_t> wstringbuf;
// 27.7.2 Template class basic_istringstream
template<typename _CharT, typename _Traits, typename _Alloc>
@ -237,8 +234,6 @@ namespace std {
};
typedef basic_istringstream<char> istringstream;
typedef basic_istringstream<wchar_t> wistringstream;
// 27.7.3 Template class basic_ostringstream
template <typename _CharT, typename _Traits, typename _Alloc>
@ -290,8 +285,6 @@ namespace std {
};
typedef basic_ostringstream<char> ostringstream;
typedef basic_ostringstream<wchar_t> wostringstream;
// 27.7.4 Template class basic_stringstream
template <typename _CharT, typename _Traits, typename _Alloc>
@ -344,9 +337,6 @@ namespace std {
{ rdbuf()->str(__s); }
};
typedef basic_stringstream<char> stringstream;
typedef basic_stringstream<wchar_t> wstringstream;
} // namespace std

View File

@ -505,9 +505,6 @@ namespace std {
#endif
};
typedef basic_streambuf<char> streambuf;
typedef basic_streambuf<wchar_t> wstreambuf;
} // namespace std
#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT

View File

@ -1,8 +1,46 @@
// 19990404 gdr
// Copyright (C) 1999, 2000 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#include <valarray>
int main()
{
std::valarray<double> a(20);
// 01: instantiation
std::valarray<double> a(20);
// 02: algo
using std::valarray;
valarray<double> b, c;
double m = std::abs(b - c).max();
return 0;
}