+2003-10-09 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/string-inst.cc: Prune.
+ * testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust line numbers.
+ * testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
+
+2003-10-09 Petur Runolfsson <peturr02@ru.is>
+
+ * src/io-inst.cc: Don't include iostream.
+ * include/bits/ios_base.h (ios_base::failure): Use string.
+ * src/Makefile.am: Add ios_failure.cc.
+ * src/Makefile.in: Regenerate.
+ * src/ios.cc: Move ios_base::failure definitions to...
+ * src/ios_failure.cc: ...here. New.
+
2003-10-09 Petur Runolfsson <peturr02@ru.is>
PR libstdc++/9874
// the GNU General Public License.
//
-// ISO C++ 14882: 27.8 File-based streams
+// ISO C++ 14882: 27.4 Iostreams base classes
//
/** @file ios_base.h
what() const throw();
private:
- enum { _S_bufsize = 256 };
- char _M_name[_S_bufsize];
+ string _M_msg;
#endif
};
globals.cc \
io-inst.cc \
ios.cc \
+ ios_failure.cc \
istream-inst.cc \
limits.cc \
locale.cc \
globals.cc \
io-inst.cc \
ios.cc \
+ ios_failure.cc \
istream-inst.cc \
limits.cc \
locale.cc \
am__objects_3 = allocator-inst.lo codecvt.lo complex_io.lo \
concept-inst.lo ctype.lo demangle.lo ext-inst.lo \
fstream-inst.lo functexcept.lo globals.lo io-inst.lo ios.lo \
- istream-inst.lo limits.lo locale.lo locale-inst.lo \
+ ios_failure.lo istream-inst.lo limits.lo locale.lo locale-inst.lo \
localename.lo misc-inst.lo ostream-inst.lo sstream-inst.lo \
stdexcept.lo stl_tree.lo streambuf-inst.lo string-inst.lo \
strstream.lo valarray-inst.lo wstring-inst.lo $(am__objects_1) \
// Explicit instantiation file.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
#include <ios>
#include <iomanip>
-#include <iostream>
namespace std
{
int ios_base::Init::_S_ios_base_init = 0;
bool ios_base::Init::_S_synced_with_stdio = true;
- ios_base::failure::failure(const string& __str) throw()
- {
- strncpy(_M_name, __str.c_str(), _S_bufsize);
- _M_name[_S_bufsize - 1] = '\0';
- }
-
- ios_base::failure::~failure() throw()
- { }
-
- const char*
- ios_base::failure::what() const throw()
- { return _M_name; }
-
ios_base::Init::Init()
{
if (_S_ios_base_init == 0)
}
return __ret;
}
-} // namespace std
+} // namespace std
--- /dev/null
+// Iostreams base classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// 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.
+
+//
+// ISO C++ 14882: 27.4.2.1.1 Class ios_base::failure
+//
+
+#include <ios>
+
+namespace std
+{
+ ios_base::failure::failure(const string& __str) throw()
+ : _M_msg(__str) { }
+
+ ios_base::failure::~failure() throw()
+ { }
+
+ const char*
+ ios_base::failure::what() const throw()
+ { return _M_msg.c_str(); }
+} // namespace std
// Components for manipulating sequences of characters -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
template
S::basic_string(S::iterator, S::iterator, const allocator<C>&);
- template
- S::basic_string(S::const_iterator, S::const_iterator, const allocator<C>&);
-
- template
- S&
- S::_M_replace(S::iterator, S::iterator, S::iterator, S::iterator,
- input_iterator_tag);
-
- template
- S&
- S::_M_replace(S::iterator, S::iterator, S::const_iterator,
- S::const_iterator, input_iterator_tag);
-
- template
- S&
- S::_M_replace(S::iterator, S::iterator, C*, C*, input_iterator_tag);
-
template
S&
S::_M_replace(S::iterator, S::iterator, const C*, const C*,
S&
S::_M_replace_safe(S::iterator, S::iterator, S::iterator, S::iterator);
- template
- S&
- S::_M_replace_safe(S::iterator, S::iterator, S::const_iterator,
- S::const_iterator);
-
- template
- S&
- S::_M_replace_safe(S::iterator, S::iterator, C*, C*);
-
template
S&
S::_M_replace_safe(S::iterator, S::iterator, const C*, const C*);
S::_S_construct(S::iterator, S::iterator,
const allocator<C>&, forward_iterator_tag);
- template
- C*
- S::_S_construct(S::const_iterator, S::const_iterator,
- const allocator<C>&, forward_iterator_tag);
-
template
C*
S::_S_construct(C*, C*, const allocator<C>&, forward_iterator_tag);
C*
S::_S_construct(const C*, const C*, const allocator<C>&,
forward_iterator_tag);
-
- template
- void
- __destroy_aux<S*>(S*, S*, __false_type);
} // namespace std
io1 = io2;
}
// { dg-error "within this context" "" { target *-*-* } 41 }
-// { dg-error "is private" "" { target *-*-* } 748 }
+// { dg-error "is private" "" { target *-*-* } 747 }
// { dg-error "operator=" "" { target *-*-* } 0 }
test_base io2 = io1;
}
// { dg-error "within this context" "" { target *-*-* } 41 }
-// { dg-error "is private" "" { target *-*-* } 745 }
+// { dg-error "is private" "" { target *-*-* } 744 }
// { dg-error "copy constructor" "" { target *-*-* } 0 }