localefwd.h: Remove redundant inline qualifiers.
authorPaolo Carlini <pcarlini@suse.de>
Sun, 29 Apr 2007 16:06:09 +0000 (16:06 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sun, 29 Apr 2007 16:06:09 +0000 (16:06 +0000)
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.

From-SVN: r124282

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/basic_ios.h
libstdc++-v3/include/bits/basic_ios.tcc
libstdc++-v3/include/bits/localefwd.h

index 8084c5c..4943213 100644 (file)
@@ -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].
index d078431..ea9c0dc 100644 (file)
@@ -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
 
 #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)
       { }
 
       /**
index e8434a5..399e93a 100644 (file)
@@ -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
index aff3e23..94a7363 100644 (file)
@@ -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
 #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