From 5312a1d9d18f42f15d1f9cdecf689223f9e030c9 Mon Sep 17 00:00:00 2001 From: Levente Farkas Date: Mon, 14 Aug 2000 21:46:44 +0200 Subject: [PATCH] std_fstream.h: Remove duplicate typdefs for ofstream and wofstream... 2000-08-14 Levente Farkas * 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 --- libstdc++-v3/ChangeLog | 11 +++++ libstdc++-v3/bits/std_fstream.h | 9 +---- libstdc++-v3/bits/std_sstream.h | 10 ----- libstdc++-v3/bits/std_streambuf.h | 3 -- .../testsuite/26_numerics/valarray.cc | 40 ++++++++++++++++++- 5 files changed, 51 insertions(+), 22 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index dd77a58534b..5758419e9f9 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,14 @@ +2000-08-14 Levente Farkas + + * 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 * configure: Regenerate after change to ../libtool.m4. diff --git a/libstdc++-v3/bits/std_fstream.h b/libstdc++-v3/bits/std_fstream.h index b727b082515..d745ee93c28 100644 --- a/libstdc++-v3/bits/std_fstream.h +++ b/libstdc++-v3/bits/std_fstream.h @@ -228,8 +228,6 @@ namespace std { _M_output_unshift(); }; - typedef basic_filebuf filebuf; - typedef basic_filebuf wfilebuf; // 27.8.1.5 Template class basic_ifstream template @@ -285,6 +283,7 @@ namespace std { this->setstate(ios_base::failbit); } }; + // 27.8.1.8 Template class basic_ofstream template @@ -343,9 +342,6 @@ namespace std { } }; - typedef basic_ofstream ofstream; - typedef basic_ofstream wofstream; - // 27.8.1.11 Template class basic_fstream template @@ -405,9 +401,6 @@ namespace std { } }; - typedef basic_fstream fstream; - typedef basic_fstream wfstream; - } // namespace std diff --git a/libstdc++-v3/bits/std_sstream.h b/libstdc++-v3/bits/std_sstream.h index 343919c68c2..f3207110d2d 100644 --- a/libstdc++-v3/bits/std_sstream.h +++ b/libstdc++-v3/bits/std_sstream.h @@ -183,9 +183,6 @@ namespace std { } }; - typedef basic_stringbuf stringbuf; - typedef basic_stringbuf wstringbuf; - // 27.7.2 Template class basic_istringstream template @@ -237,8 +234,6 @@ namespace std { }; - typedef basic_istringstream istringstream; - typedef basic_istringstream wistringstream; // 27.7.3 Template class basic_ostringstream template @@ -290,8 +285,6 @@ namespace std { }; - typedef basic_ostringstream ostringstream; - typedef basic_ostringstream wostringstream; // 27.7.4 Template class basic_stringstream template @@ -344,9 +337,6 @@ namespace std { { rdbuf()->str(__s); } }; - typedef basic_stringstream stringstream; - typedef basic_stringstream wstringstream; - } // namespace std diff --git a/libstdc++-v3/bits/std_streambuf.h b/libstdc++-v3/bits/std_streambuf.h index e473af5c032..774046b6666 100644 --- a/libstdc++-v3/bits/std_streambuf.h +++ b/libstdc++-v3/bits/std_streambuf.h @@ -505,9 +505,6 @@ namespace std { #endif }; - typedef basic_streambuf streambuf; - typedef basic_streambuf wstreambuf; - } // namespace std #ifdef _GLIBCPP_NO_TEMPLATE_EXPORT diff --git a/libstdc++-v3/testsuite/26_numerics/valarray.cc b/libstdc++-v3/testsuite/26_numerics/valarray.cc index 6ee792a3d17..8702198ca35 100644 --- a/libstdc++-v3/testsuite/26_numerics/valarray.cc +++ b/libstdc++-v3/testsuite/26_numerics/valarray.cc @@ -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 int main() { - std::valarray a(20); + // 01: instantiation + std::valarray a(20); + + // 02: algo + using std::valarray; + valarray b, c; + double m = std::abs(b - c).max(); + + return 0; } + + + -- 2.30.2