2003-07-09 02:40:29 +02:00
|
|
|
// POD character, std::char_traits specialization -*- C++ -*-
|
|
|
|
|
2005-04-15 04:06:26 +02:00
|
|
|
// Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
2003-07-09 02:40:29 +02:00
|
|
|
//
|
|
|
|
// 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
|
2005-08-17 04:28:44 +02:00
|
|
|
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
2003-07-09 02:40:29 +02:00
|
|
|
// 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.
|
|
|
|
|
2004-11-24 05:11:23 +01:00
|
|
|
/** @file ext/pod_char_traits.h
|
|
|
|
* This file is a GNU extension to the Standard C++ Library.
|
|
|
|
*/
|
|
|
|
|
2003-07-09 02:40:29 +02:00
|
|
|
// Gabriel Dos Reis <gdr@integrable-solutions.net>
|
|
|
|
// Benjamin Kosnik <bkoz@redhat.com>
|
|
|
|
|
|
|
|
#ifndef _POD_CHAR_TRAITS_H
|
|
|
|
#define _POD_CHAR_TRAITS_H 1
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
|
2003-07-09 02:40:29 +02:00
|
|
|
#include <string>
|
|
|
|
|
2005-12-19 01:56:05 +01:00
|
|
|
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
|
|
|
|
2005-04-15 04:06:26 +02:00
|
|
|
// POD character abstraction.
|
|
|
|
// NB: The char_type parameter is a subset of int_type, as to allow
|
|
|
|
// int_type to properly hold the full range of char_type values as
|
|
|
|
// well as EOF.
|
2004-11-24 05:11:23 +01:00
|
|
|
/// @brief A POD class that serves as a character abstraction class.
|
2003-07-17 06:01:28 +02:00
|
|
|
template<typename V, typename I, typename S = mbstate_t>
|
2003-07-09 02:40:29 +02:00
|
|
|
struct character
|
|
|
|
{
|
2005-04-15 04:06:26 +02:00
|
|
|
typedef V value_type;
|
|
|
|
typedef I int_type;
|
|
|
|
typedef S state_type;
|
|
|
|
typedef character<V, I, S> char_type;
|
|
|
|
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
value_type value;
|
2005-04-15 04:06:26 +02:00
|
|
|
|
|
|
|
template<typename V2>
|
|
|
|
static char_type
|
|
|
|
from(const V2& v)
|
|
|
|
{
|
|
|
|
char_type ret = { static_cast<value_type>(v) };
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename V2>
|
|
|
|
static V2
|
|
|
|
to(const char_type& c)
|
|
|
|
{
|
|
|
|
V2 ret = { static_cast<V2>(c.value) };
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2003-07-09 02:40:29 +02:00
|
|
|
};
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
|
2005-04-15 04:06:26 +02:00
|
|
|
template<typename V, typename I, typename S>
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
inline bool
|
2005-04-15 04:06:26 +02:00
|
|
|
operator==(const character<V, I, S>& lhs, const character<V, I, S>& rhs)
|
2003-07-09 02:40:29 +02:00
|
|
|
{ return lhs.value == rhs.value; }
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
|
2005-04-15 04:06:26 +02:00
|
|
|
template<typename V, typename I, typename S>
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
inline bool
|
2005-04-15 04:06:26 +02:00
|
|
|
operator<(const character<V, I, S>& lhs, const character<V, I, S>& rhs)
|
2003-07-09 02:40:29 +02:00
|
|
|
{ return lhs.value < rhs.value; }
|
|
|
|
|
2005-12-19 01:56:05 +01:00
|
|
|
_GLIBCXX_END_NAMESPACE
|
|
|
|
|
|
|
|
_GLIBCXX_BEGIN_NAMESPACE(std)
|
|
|
|
|
2004-11-24 05:11:23 +01:00
|
|
|
/// char_traits<__gnu_cxx::character> specialization.
|
2003-07-17 06:01:28 +02:00
|
|
|
template<typename V, typename I, typename S>
|
|
|
|
struct char_traits<__gnu_cxx::character<V, I, S> >
|
2003-07-09 02:40:29 +02:00
|
|
|
{
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
typedef __gnu_cxx::character<V, I, S> char_type;
|
2003-07-09 02:40:29 +02:00
|
|
|
typedef typename char_type::int_type int_type;
|
2003-07-17 06:01:28 +02:00
|
|
|
typedef typename char_type::state_type state_type;
|
2003-10-21 00:11:40 +02:00
|
|
|
typedef fpos<state_type> pos_type;
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
typedef streamoff off_type;
|
|
|
|
|
|
|
|
static void
|
2003-07-09 02:40:29 +02:00
|
|
|
assign(char_type& __c1, const char_type& __c2)
|
|
|
|
{ __c1 = __c2; }
|
|
|
|
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
static bool
|
2003-07-09 02:40:29 +02:00
|
|
|
eq(const char_type& __c1, const char_type& __c2)
|
|
|
|
{ return __c1 == __c2; }
|
|
|
|
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
static bool
|
2003-07-09 02:40:29 +02:00
|
|
|
lt(const char_type& __c1, const char_type& __c2)
|
|
|
|
{ return __c1 < __c2; }
|
|
|
|
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
static int
|
2003-07-09 02:40:29 +02:00
|
|
|
compare(const char_type* __s1, const char_type* __s2, size_t __n)
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
{
|
2003-07-09 02:40:29 +02:00
|
|
|
for (size_t __i = 0; __i < __n; ++__i)
|
|
|
|
if (!eq(__s1[__i], __s2[__i]))
|
|
|
|
return lt(__s1[__i], __s2[__i]) ? -1 : 1;
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
return 0;
|
2003-07-09 02:40:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static size_t
|
|
|
|
length(const char_type* __s)
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
{
|
|
|
|
const char_type* __p = __s;
|
|
|
|
while (__p->value)
|
|
|
|
++__p;
|
|
|
|
return (__p - __s);
|
2003-07-09 02:40:29 +02:00
|
|
|
}
|
|
|
|
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
static const char_type*
|
2003-07-09 02:40:29 +02:00
|
|
|
find(const char_type* __s, size_t __n, const char_type& __a)
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
{
|
2003-07-09 02:40:29 +02:00
|
|
|
for (const char_type* __p = __s; size_t(__p - __s) < __n; ++__p)
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
if (*__p == __a)
|
2003-07-09 02:40:29 +02:00
|
|
|
return __p;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
static char_type*
|
2003-07-09 02:40:29 +02:00
|
|
|
move(char_type* __s1, const char_type* __s2, size_t __n)
|
2005-04-15 04:06:26 +02:00
|
|
|
{
|
|
|
|
return static_cast<char_type*>(std::memmove(__s1, __s2,
|
|
|
|
__n * sizeof(char_type)));
|
|
|
|
}
|
2003-07-09 02:40:29 +02:00
|
|
|
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
static char_type*
|
2003-07-09 02:40:29 +02:00
|
|
|
copy(char_type* __s1, const char_type* __s2, size_t __n)
|
2005-04-15 04:06:26 +02:00
|
|
|
{
|
|
|
|
std::copy(__s2, __s2 + __n, __s1);
|
|
|
|
return __s1;
|
|
|
|
}
|
2003-07-09 02:40:29 +02:00
|
|
|
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
static char_type*
|
2003-07-09 02:40:29 +02:00
|
|
|
assign(char_type* __s, size_t __n, char_type __a)
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
{
|
2005-04-15 04:06:26 +02:00
|
|
|
std::fill_n(__s, __n, __a);
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
return __s;
|
2003-07-09 02:40:29 +02:00
|
|
|
}
|
|
|
|
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
static char_type
|
2005-04-15 04:06:26 +02:00
|
|
|
to_char_type(const int_type& __i)
|
|
|
|
{ return char_type::template from(__i); }
|
2003-07-09 02:40:29 +02:00
|
|
|
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
static int_type
|
|
|
|
to_int_type(const char_type& __c)
|
2005-04-15 04:06:26 +02:00
|
|
|
{ return char_type::template to<int_type>(__c); }
|
2003-07-09 02:40:29 +02:00
|
|
|
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
static bool
|
2003-07-09 02:40:29 +02:00
|
|
|
eq_int_type(const int_type& __c1, const int_type& __c2)
|
|
|
|
{ return __c1 == __c2; }
|
|
|
|
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
static int_type
|
2005-04-15 04:06:26 +02:00
|
|
|
eof()
|
|
|
|
{
|
|
|
|
int_type __r = { -1 };
|
|
|
|
return __r;
|
|
|
|
}
|
2003-07-09 02:40:29 +02:00
|
|
|
|
algorithm, [...]: Remove trailing whitespace.
* include/ext/algorithm, include/ext/debug_allocator.h,
include/ext/enc_filebuf.h, include/ext/functional,
include/ext/hash_fun.h, include/ext/hash_map, include/ext/hash_set,
include/ext/hashtable.h, include/ext/iterator,
include/ext/malloc_allocator.h, include/ext/memory,
include/ext/mt_allocator.h, include/ext/numeric,
include/ext/pod_char_traits.h, include/ext/pool_allocator.h,
include/ext/rb_tree, include/ext/rope, include/ext/ropeimpl.h,
include/ext/slist, include/ext/stdio_filebuf.h,
include/ext/stdio_sync_filebuf.h: Remove trailing whitespace.
From-SVN: r74464
2003-12-09 05:31:53 +01:00
|
|
|
static int_type
|
2003-07-09 02:40:29 +02:00
|
|
|
not_eof(const int_type& __c)
|
2005-04-15 04:06:26 +02:00
|
|
|
{ return eq_int_type(__c, eof()) ? int_type() : __c; }
|
2003-07-09 02:40:29 +02:00
|
|
|
};
|
2005-12-19 01:56:05 +01:00
|
|
|
|
|
|
|
_GLIBCXX_END_NAMESPACE
|
2003-07-09 02:40:29 +02:00
|
|
|
|
|
|
|
#endif
|