summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-29 16:06:09 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-29 16:06:09 +0000
commitc36a973ff4869c01fae86c1893c4fac37ed76a71 (patch)
treea3ce936a8860504e3cf9103c8474d6750b496b66 /libstdc++-v3
parent0a2892e73d74288fce34f6a3f2c7885bdc409259 (diff)
downloadppe42-gcc-c36a973ff4869c01fae86c1893c4fac37ed76a71.tar.gz
ppe42-gcc-c36a973ff4869c01fae86c1893c4fac37ed76a71.zip
2007-04-29 Paolo Carlini <pcarlini@suse.de>
* include/bits/localefwd.h: Remove redundant inline qualifiers. (__check_facet): Move... * include/bits/basic_ios.h: ... here. (widen(char), narrow(char_type, char)): Define inline. * include/bits/basic_ios.tcc (widen(char), narrow(char_type, char)): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124282 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog9
-rw-r--r--libstdc++-v3/include/bits/basic_ios.h24
-rw-r--r--libstdc++-v3/include/bits/basic_ios.tcc12
-rw-r--r--libstdc++-v3/include/bits/localefwd.h59
4 files changed, 53 insertions, 51 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 8084c5c4c98..49432131ab0 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,12 @@
+2007-04-29 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/localefwd.h: Remove redundant inline qualifiers.
+ (__check_facet): Move...
+ * include/bits/basic_ios.h: ... here.
+ (widen(char), narrow(char_type, char)): Define inline.
+ * include/bits/basic_ios.tcc (widen(char), narrow(char_type, char)):
+ Remove.
+
2007-04-27 Paolo Carlini <pcarlini@suse.de>
DR 438, [DR].
diff --git a/libstdc++-v3/include/bits/basic_ios.h b/libstdc++-v3/include/bits/basic_ios.h
index d078431b9fd..ea9c0dc6565 100644
--- a/libstdc++-v3/include/bits/basic_ios.h
+++ b/libstdc++-v3/include/bits/basic_ios.h
@@ -1,6 +1,7 @@
// Iostreams base classes -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -38,13 +39,22 @@
#pragma GCC system_header
-#include <bits/streambuf_iterator.h>
#include <bits/localefwd.h>
#include <bits/locale_classes.h>
#include <bits/locale_facets.h>
+#include <bits/streambuf_iterator.h>
_GLIBCXX_BEGIN_NAMESPACE(std)
+ template<typename _Facet>
+ inline const _Facet&
+ __check_facet(const _Facet* __f)
+ {
+ if (!__f)
+ __throw_bad_cast();
+ return *__f;
+ }
+
// 27.4.5 Template class basic_ios
/**
* @brief Virtual base class for all stream classes.
@@ -255,7 +265,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
explicit
basic_ios(basic_streambuf<_CharT, _Traits>* __sb)
: ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0),
- _M_ctype(0), _M_num_put(0), _M_num_get(0)
+ _M_ctype(0), _M_num_put(0), _M_num_get(0)
{ this->init(__sb); }
/**
@@ -413,7 +423,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* http://gcc.gnu.org/onlinedocs/libstdc++/22_locale/howto.html
*/
char
- narrow(char_type __c, char __dfault) const;
+ narrow(char_type __c, char __dfault) const
+ { return __check_facet(_M_ctype).narrow(__c, __dfault); }
/**
* @brief Widens characters.
@@ -431,7 +442,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* http://gcc.gnu.org/onlinedocs/libstdc++/22_locale/howto.html
*/
char_type
- widen(char __c) const;
+ widen(char __c) const
+ { return __check_facet(_M_ctype).widen(__c); }
protected:
// 27.4.5.1 basic_ios constructors
@@ -443,7 +455,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
*/
basic_ios()
: ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false),
- _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0)
+ _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0)
{ }
/**
diff --git a/libstdc++-v3/include/bits/basic_ios.tcc b/libstdc++-v3/include/bits/basic_ios.tcc
index e8434a5bdf0..399e93ae737 100644
--- a/libstdc++-v3/include/bits/basic_ios.tcc
+++ b/libstdc++-v3/include/bits/basic_ios.tcc
@@ -1,6 +1,6 @@
// basic_ios member functions -*- C++ -*-
-// Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -112,16 +112,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return *this;
}
- template<typename _CharT, typename _Traits>
- char
- basic_ios<_CharT, _Traits>::narrow(char_type __c, char __dfault) const
- { return __check_facet(_M_ctype).narrow(__c, __dfault); }
-
- template<typename _CharT, typename _Traits>
- _CharT
- basic_ios<_CharT, _Traits>::widen(char __c) const
- { return __check_facet(_M_ctype).widen(__c); }
-
// Locales:
template<typename _CharT, typename _Traits>
locale
diff --git a/libstdc++-v3/include/bits/localefwd.h b/libstdc++-v3/include/bits/localefwd.h
index aff3e23e16d..94a73639cbb 100644
--- a/libstdc++-v3/include/bits/localefwd.h
+++ b/libstdc++-v3/include/bits/localefwd.h
@@ -1,6 +1,7 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+// 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -43,67 +44,74 @@
#pragma GCC system_header
#include <bits/c++config.h>
-#include <bits/c++locale.h> // Defines __c_locale, config-specific includes
-#include <iosfwd> // For ostreambuf_iterator, istreambuf_iterator
+#include <bits/c++locale.h> // Defines __c_locale, config-specific include
+#include <iosfwd> // For ostreambuf_iterator, istreambuf_iterator
#include <cctype>
-#include <bits/functexcept.h>
_GLIBCXX_BEGIN_NAMESPACE(std)
// 22.1.1 Locale
class locale;
+ template<typename _Facet>
+ bool
+ has_facet(const locale&) throw();
+
+ template<typename _Facet>
+ const _Facet&
+ use_facet(const locale&);
+
// 22.1.3 Convenience interfaces
template<typename _CharT>
- inline bool
+ bool
isspace(_CharT, const locale&);
template<typename _CharT>
- inline bool
+ bool
isprint(_CharT, const locale&);
template<typename _CharT>
- inline bool
+ bool
iscntrl(_CharT, const locale&);
template<typename _CharT>
- inline bool
+ bool
isupper(_CharT, const locale&);
template<typename _CharT>
- inline bool
+ bool
islower(_CharT, const locale&);
template<typename _CharT>
- inline bool
+ bool
isalpha(_CharT, const locale&);
template<typename _CharT>
- inline bool
+ bool
isdigit(_CharT, const locale&);
template<typename _CharT>
- inline bool
+ bool
ispunct(_CharT, const locale&);
template<typename _CharT>
- inline bool
+ bool
isxdigit(_CharT, const locale&);
template<typename _CharT>
- inline bool
+ bool
isalnum(_CharT, const locale&);
template<typename _CharT>
- inline bool
+ bool
isgraph(_CharT, const locale&);
template<typename _CharT>
- inline _CharT
+ _CharT
toupper(_CharT, const locale&);
template<typename _CharT>
- inline _CharT
+ _CharT
tolower(_CharT, const locale&);
// 22.2.1 and 22.2.1.3 ctype
@@ -175,23 +183,6 @@ _GLIBCXX_END_LDBL_NAMESPACE
template<typename _CharT>
class messages_byname;
- template<typename _Facet>
- bool
- has_facet(const locale& __loc) throw();
-
- template<typename _Facet>
- const _Facet&
- use_facet(const locale& __loc);
-
- template<typename _Facet>
- inline const _Facet&
- __check_facet(const _Facet* __f)
- {
- if (!__f)
- __throw_bad_cast();
- return *__f;
- }
-
_GLIBCXX_END_NAMESPACE
#endif
OpenPOWER on IntegriCloud