ios_failure.cc revision 132720
172445Sassar// Iostreams base classes -*- C++ -*-
2233294Sstas
3233294Sstas// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
4233294Sstas// Free Software Foundation, Inc.
572445Sassar//
6233294Sstas// This file is part of the GNU ISO C++ Library.  This library is free
7233294Sstas// software; you can redistribute it and/or modify it under the
8233294Sstas// terms of the GNU General Public License as published by the
972445Sassar// Free Software Foundation; either version 2, or (at your option)
10233294Sstas// any later version.
11233294Sstas
1272445Sassar// This library is distributed in the hope that it will be useful,
13233294Sstas// but WITHOUT ANY WARRANTY; without even the implied warranty of
14233294Sstas// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15233294Sstas// GNU General Public License for more details.
1672445Sassar
17233294Sstas// You should have received a copy of the GNU General Public License along
18233294Sstas// with this library; see the file COPYING.  If not, write to the Free
19233294Sstas// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2072445Sassar// USA.
21233294Sstas
22233294Sstas// As a special exception, you may use this file as part of a free software
23233294Sstas// library without restriction.  Specifically, if other files instantiate
24233294Sstas// templates or use macros or inline functions from this file, or you compile
25233294Sstas// this file and link it with other files to produce an executable, this
26233294Sstas// file does not by itself cause the resulting executable to be covered by
27233294Sstas// the GNU General Public License.  This exception does not however
28233294Sstas// invalidate any other reasons why the executable file might be covered by
29233294Sstas// the GNU General Public License.
30233294Sstas
31233294Sstas//
3272445Sassar// ISO C++ 14882: 27.4.2.1.1  Class ios_base::failure
3372445Sassar//
34233294Sstas
3572445Sassar#include <ios>
36233294Sstas
37233294Sstasnamespace std
38233294Sstas{
3972445Sassar  ios_base::failure::failure(const string& __str) throw()
4072445Sassar  : _M_msg(__str) { }
41233294Sstas
4272445Sassar  ios_base::failure::~failure() throw()
43233294Sstas  { }
4472445Sassar
4572445Sassar  const char*
46233294Sstas  ios_base::failure::what() const throw()
47233294Sstas  { return _M_msg.c_str(); }
4872445Sassar} // namespace std
4978527Sassar