// Locale support -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007, 2008, 2009, 2010
-// Free Software Foundation, Inc.
+// Copyright (C) 1997-2014 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
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
-/** @file locale_facets.h
+/** @file bits/locale_facets.h
* This is an internal header file, included by other library headers.
- * You should not attempt to use it directly.
+ * Do not attempt to use it directly. @headername{locale}
*/
//
#include <cwctype> // For wctype_t
#include <cctype>
-#include <bits/ctype_base.h>
+#include <bits/ctype_base.h>
#include <iosfwd>
#include <bits/ios_base.h> // For ios_base, ios_base::iostate
#include <streambuf>
#include <ext/numeric_traits.h>
#include <bits/streambuf_iterator.h>
-_GLIBCXX_BEGIN_NAMESPACE(std)
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
// NB: Don't instantiate required wchar_t facets if no wchar_t support.
#ifdef _GLIBCXX_USE_WCHAR_T
/**
* @brief Test char_type classification.
*
- * This function finds a mask M for @a c and compares it to mask @a m.
- * It does so by returning the value of ctype<char_type>::do_is().
+ * This function finds a mask M for @a __c and compares it to
+ * mask @a __m. It does so by returning the value of
+ * ctype<char_type>::do_is().
*
- * @param c The char_type to compare the mask of.
- * @param m The mask to compare against.
- * @return (M & m) != 0.
+ * @param __c The char_type to compare the mask of.
+ * @param __m The mask to compare against.
+ * @return (M & __m) != 0.
*/
bool
is(mask __m, char_type __c) const
* as the char array. It does so by returning the value of
* ctype<char_type>::do_is().
*
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @param vec Pointer to an array of mask storage.
- * @return @a hi.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @param __vec Pointer to an array of mask storage.
+ * @return @a __hi.
*/
const char_type*
is(const char_type *__lo, const char_type *__hi, mask *__vec) const
* [lo,hi) for which is(m,c) is true. It does so by returning
* ctype<char_type>::do_scan_is().
*
- * @param m The mask to compare against.
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @return Pointer to matching char_type if found, else @a hi.
+ * @param __m The mask to compare against.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @return Pointer to matching char_type if found, else @a __hi.
*/
const char_type*
scan_is(mask __m, const char_type* __lo, const char_type* __hi) const
* [lo,hi) for which is(m,c) is false. It does so by returning
* ctype<char_type>::do_scan_not().
*
- * @param m The mask to compare against.
- * @param lo Pointer to first char in range.
- * @param hi Pointer to end of range.
- * @return Pointer to non-matching char if found, else @a hi.
+ * @param __m The mask to compare against.
+ * @param __lo Pointer to first char in range.
+ * @param __hi Pointer to end of range.
+ * @return Pointer to non-matching char if found, else @a __hi.
*/
const char_type*
scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
* If not possible (for example, '2'), returns the argument. It does
* so by returning ctype<char_type>::do_toupper().
*
- * @param c The char_type to convert.
- * @return The uppercase char_type if convertible, else @a c.
+ * @param __c The char_type to convert.
+ * @return The uppercase char_type if convertible, else @a __c.
*/
char_type
toupper(char_type __c) const
* uppercase if possible. Other elements remain untouched. It does so
* by returning ctype<char_type>:: do_toupper(lo, hi).
*
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @return @a hi.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @return @a __hi.
*/
const char_type*
toupper(char_type *__lo, const char_type* __hi) const
* not possible (for example, '2'), returns the argument. It does so
* by returning ctype<char_type>::do_tolower(c).
*
- * @param c The char_type to convert.
- * @return The lowercase char_type if convertible, else @a c.
+ * @param __c The char_type to convert.
+ * @return The lowercase char_type if convertible, else @a __c.
*/
char_type
tolower(char_type __c) const
/**
* @brief Convert array to lowercase.
*
- * This function converts each char_type in the range [lo,hi) to
+ * This function converts each char_type in the range [__lo,__hi) to
* lowercase if possible. Other elements remain untouched. It does so
- * by returning ctype<char_type>:: do_tolower(lo, hi).
+ * by returning ctype<char_type>:: do_tolower(__lo, __hi).
*
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @return @a hi.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @return @a __hi.
*/
const char_type*
tolower(char_type* __lo, const char_type* __hi) const
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param c The char to convert.
+ * @param __c The char to convert.
* @return The converted char_type.
*/
char_type
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @param to Pointer to the destination array.
- * @return @a hi.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @param __to Pointer to the destination array.
+ * @return @a __hi.
*/
const char*
widen(const char* __lo, const char* __hi, char_type* __to) const
* This function converts the char_type to char using the simplest
* reasonable transformation. If the conversion fails, dfault is
* returned instead. It does so by returning
- * ctype<char_type>::do_narrow(c).
+ * ctype<char_type>::do_narrow(__c).
*
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param c The char_type to convert.
- * @param dfault Char to return if conversion fails.
+ * @param __c The char_type to convert.
+ * @param __dfault Char to return if conversion fails.
* @return The converted char.
*/
char
* simplest reasonable transformation and writes the results to the
* destination array. For any char_type in the input that cannot be
* converted, @a dfault is used instead. It does so by returning
- * ctype<char_type>::do_narrow(lo, hi, dfault, to).
+ * ctype<char_type>::do_narrow(__lo, __hi, __dfault, __to).
*
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @param dfault Char to use if conversion fails.
- * @param to Pointer to the destination array.
- * @return @a hi.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @param __dfault Char to use if conversion fails.
+ * @param __to Pointer to the destination array.
+ * @return @a __hi.
*/
const char_type*
narrow(const char_type* __lo, const char_type* __hi,
- char __dfault, char *__to) const
+ char __dfault, char* __to) const
{ return this->do_narrow(__lo, __hi, __dfault, __to); }
protected:
* classifying. do_is() must always return the same result for the
* same input.
*
- * @param c The char_type to find the mask of.
- * @param m The mask to compare against.
- * @return (M & m) != 0.
+ * @param __c The char_type to find the mask of.
+ * @param __m The mask to compare against.
+ * @return (M & __m) != 0.
*/
virtual bool
do_is(mask __m, char_type __c) const = 0;
* classifying. do_is() must always return the same result for the
* same input.
*
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @param vec Pointer to an array of mask storage.
- * @return @a hi.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @param __vec Pointer to an array of mask storage.
+ * @return @a __hi.
*/
virtual const char_type*
do_is(const char_type* __lo, const char_type* __hi,
* @brief Find char_type matching mask
*
* This function searches for and returns the first char_type c in
- * [lo,hi) for which is(m,c) is true.
+ * [__lo,__hi) for which is(__m,c) is true.
*
* do_scan_is() is a hook for a derived facet to change the behavior of
* match searching. do_is() must always return the same result for the
* same input.
*
- * @param m The mask to compare against.
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @return Pointer to a matching char_type if found, else @a hi.
+ * @param __m The mask to compare against.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @return Pointer to a matching char_type if found, else @a __hi.
*/
virtual const char_type*
do_scan_is(mask __m, const char_type* __lo,
* match searching. do_is() must always return the same result for the
* same input.
*
- * @param m The mask to compare against.
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @return Pointer to a non-matching char_type if found, else @a hi.
+ * @param __m The mask to compare against.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @return Pointer to a non-matching char_type if found, else @a __hi.
*/
virtual const char_type*
do_scan_not(mask __m, const char_type* __lo,
* uppercasing. do_toupper() must always return the same result for
* the same input.
*
- * @param c The char_type to convert.
- * @return The uppercase char_type if convertible, else @a c.
+ * @param __c The char_type to convert.
+ * @return The uppercase char_type if convertible, else @a __c.
*/
virtual char_type
- do_toupper(char_type) const = 0;
+ do_toupper(char_type __c) const = 0;
/**
* @brief Convert array to uppercase.
*
- * This virtual function converts each char_type in the range [lo,hi)
+ * This virtual function converts each char_type in the range [__lo,__hi)
* to uppercase if possible. Other elements remain untouched.
*
* do_toupper() is a hook for a derived facet to change the behavior of
* uppercasing. do_toupper() must always return the same result for
* the same input.
*
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @return @a hi.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @return @a __hi.
*/
virtual const char_type*
do_toupper(char_type* __lo, const char_type* __hi) const = 0;
* lowercasing. do_tolower() must always return the same result for
* the same input.
*
- * @param c The char_type to convert.
- * @return The lowercase char_type if convertible, else @a c.
+ * @param __c The char_type to convert.
+ * @return The lowercase char_type if convertible, else @a __c.
*/
virtual char_type
- do_tolower(char_type) const = 0;
+ do_tolower(char_type __c) const = 0;
/**
* @brief Convert array to lowercase.
*
- * This virtual function converts each char_type in the range [lo,hi)
+ * This virtual function converts each char_type in the range [__lo,__hi)
* to lowercase if possible. Other elements remain untouched.
*
* do_tolower() is a hook for a derived facet to change the behavior of
* lowercasing. do_tolower() must always return the same result for
* the same input.
*
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @return @a hi.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @return @a __hi.
*/
virtual const char_type*
do_tolower(char_type* __lo, const char_type* __hi) const = 0;
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param c The char to convert.
+ * @param __c The char to convert.
* @return The converted char_type
*/
virtual char_type
- do_widen(char) const = 0;
+ do_widen(char __c) const = 0;
/**
* @brief Widen char array
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param lo Pointer to start range.
- * @param hi Pointer to end of range.
- * @param to Pointer to the destination array.
- * @return @a hi.
+ * @param __lo Pointer to start range.
+ * @param __hi Pointer to end of range.
+ * @param __to Pointer to the destination array.
+ * @return @a __hi.
*/
virtual const char*
- do_widen(const char* __lo, const char* __hi,
- char_type* __dest) const = 0;
+ do_widen(const char* __lo, const char* __hi, char_type* __to) const = 0;
/**
* @brief Narrow char_type to char
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param c The char_type to convert.
- * @param dfault Char to return if conversion fails.
+ * @param __c The char_type to convert.
+ * @param __dfault Char to return if conversion fails.
* @return The converted char.
*/
virtual char
- do_narrow(char_type, char __dfault) const = 0;
+ do_narrow(char_type __c, char __dfault) const = 0;
/**
* @brief Narrow char_type array to char
*
- * This virtual function converts each char_type in the range [lo,hi) to
- * char using the simplest reasonable transformation and writes the
- * results to the destination array. For any element in the input that
- * cannot be converted, @a dfault is used instead.
+ * This virtual function converts each char_type in the range
+ * [__lo,__hi) to char using the simplest reasonable
+ * transformation and writes the results to the destination
+ * array. For any element in the input that cannot be
+ * converted, @a __dfault is used instead.
*
* do_narrow() is a hook for a derived facet to change the behavior of
* narrowing. do_narrow() must always return the same result for the
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @param dfault Char to use if conversion fails.
- * @param to Pointer to the destination array.
- * @return @a hi.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @param __dfault Char to use if conversion fails.
+ * @param __to Pointer to the destination array.
+ * @return @a __hi.
*/
virtual const char_type*
do_narrow(const char_type* __lo, const char_type* __hi,
- char __dfault, char* __dest) const = 0;
+ char __dfault, char* __to) const = 0;
};
/**
* @ingroup locales
*
* This template class defines classification and conversion functions for
- * character sets. It wraps <cctype> functionality. Ctype gets used by
+ * character sets. It wraps cctype functionality. Ctype gets used by
* streams for many I/O operations.
*
* This template provides the protected virtual functions the developer
virtual const char_type*
do_narrow(const char_type* __lo, const char_type* __hi,
- char __dfault, char* __dest) const;
+ char __dfault, char* __to) const;
};
template<typename _CharT>
*
* This is the constructor provided by the standard.
*
- * @param table If non-zero, table is used as the per-char mask.
+ * @param __table If non-zero, table is used as the per-char mask.
* Else classic_table() is used.
- * @param del If true, passes ownership of table to this facet.
- * @param refs Passed to the base facet class.
+ * @param __del If true, passes ownership of table to this facet.
+ * @param __refs Passed to the base facet class.
*/
explicit
ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0);
*
* This constructor is used to construct the initial C locale facet.
*
- * @param cloc Handle to C locale data.
- * @param table If non-zero, table is used as the per-char mask.
- * @param del If true, passes ownership of table to this facet.
- * @param refs Passed to the base facet class.
+ * @param __cloc Handle to C locale data.
+ * @param __table If non-zero, table is used as the per-char mask.
+ * @param __del If true, passes ownership of table to this facet.
+ * @param __refs Passed to the base facet class.
*/
explicit
ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false,
/**
* @brief Test char classification.
*
- * This function compares the mask table[c] to @a m.
+ * This function compares the mask table[c] to @a __m.
*
- * @param c The char to compare the mask of.
- * @param m The mask to compare against.
- * @return True if m & table[c] is true, false otherwise.
+ * @param __c The char to compare the mask of.
+ * @param __m The mask to compare against.
+ * @return True if __m & table[__c] is true, false otherwise.
*/
inline bool
is(mask __m, char __c) const;
* successively writes it to vec. vec must have as many elements as
* the char array.
*
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @param vec Pointer to an array of mask storage.
- * @return @a hi.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @param __vec Pointer to an array of mask storage.
+ * @return @a __hi.
*/
inline const char*
is(const char* __lo, const char* __hi, mask* __vec) const;
* This function searches for and returns the first char in [lo,hi) for
* which is(m,char) is true.
*
- * @param m The mask to compare against.
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @return Pointer to a matching char if found, else @a hi.
+ * @param __m The mask to compare against.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @return Pointer to a matching char if found, else @a __hi.
*/
inline const char*
scan_is(mask __m, const char* __lo, const char* __hi) const;
* @brief Find char not matching a mask
*
* This function searches for and returns a pointer to the first char
- * in [lo,hi) for which is(m,char) is false.
+ * in [__lo,__hi) for which is(m,char) is false.
*
- * @param m The mask to compare against.
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @return Pointer to a non-matching char if found, else @a hi.
+ * @param __m The mask to compare against.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @return Pointer to a non-matching char if found, else @a __hi.
*/
inline const char*
scan_not(mask __m, const char* __lo, const char* __hi) const;
* toupper() acts as if it returns ctype<char>::do_toupper(c).
* do_toupper() must always return the same result for the same input.
*
- * @param c The char to convert.
- * @return The uppercase char if convertible, else @a c.
+ * @param __c The char to convert.
+ * @return The uppercase char if convertible, else @a __c.
*/
char_type
toupper(char_type __c) const
/**
* @brief Convert array to uppercase.
*
- * This function converts each char in the range [lo,hi) to uppercase
+ * This function converts each char in the range [__lo,__hi) to uppercase
* if possible. Other chars remain untouched.
*
- * toupper() acts as if it returns ctype<char>:: do_toupper(lo, hi).
+ * toupper() acts as if it returns ctype<char>:: do_toupper(__lo, __hi).
* do_toupper() must always return the same result for the same input.
*
- * @param lo Pointer to first char in range.
- * @param hi Pointer to end of range.
- * @return @a hi.
+ * @param __lo Pointer to first char in range.
+ * @param __hi Pointer to end of range.
+ * @return @a __hi.
*/
const char_type*
toupper(char_type *__lo, const char_type* __hi) const
* This function converts the char argument to lowercase if possible.
* If not possible (for example, '2'), returns the argument.
*
- * tolower() acts as if it returns ctype<char>::do_tolower(c).
+ * tolower() acts as if it returns ctype<char>::do_tolower(__c).
* do_tolower() must always return the same result for the same input.
*
- * @param c The char to convert.
- * @return The lowercase char if convertible, else @a c.
+ * @param __c The char to convert.
+ * @return The lowercase char if convertible, else @a __c.
*/
char_type
tolower(char_type __c) const
* This function converts each char in the range [lo,hi) to lowercase
* if possible. Other chars remain untouched.
*
- * tolower() acts as if it returns ctype<char>:: do_tolower(lo, hi).
+ * tolower() acts as if it returns ctype<char>:: do_tolower(__lo, __hi).
* do_tolower() must always return the same result for the same input.
*
- * @param lo Pointer to first char in range.
- * @param hi Pointer to end of range.
- * @return @a hi.
+ * @param __lo Pointer to first char in range.
+ * @param __hi Pointer to end of range.
+ * @return @a __hi.
*/
const char_type*
tolower(char_type* __lo, const char_type* __hi) const
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param c The char to convert.
+ * @param __c The char to convert.
* @return The converted character.
*/
char_type
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param lo Pointer to first char in range.
- * @param hi Pointer to end of range.
- * @param to Pointer to the destination array.
- * @return @a hi.
+ * @param __lo Pointer to first char in range.
+ * @param __hi Pointer to end of range.
+ * @param __to Pointer to the destination array.
+ * @return @a __hi.
*/
const char*
widen(const char* __lo, const char* __hi, char_type* __to) const
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param c The char to convert.
- * @param dfault Char to return if conversion fails.
+ * @param __c The char to convert.
+ * @param __dfault Char to return if conversion fails.
* @return The converted character.
*/
char
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @param dfault Char to use if conversion fails.
- * @param to Pointer to the destination array.
- * @return @a hi.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @param __dfault Char to use if conversion fails.
+ * @param __to Pointer to the destination array.
+ * @return @a __hi.
*/
const char_type*
narrow(const char_type* __lo, const char_type* __hi,
- char __dfault, char *__to) const
+ char __dfault, char* __to) const
{
if (__builtin_expect(_M_narrow_ok == 1, true))
{
* uppercasing. do_toupper() must always return the same result for
* the same input.
*
- * @param c The char to convert.
- * @return The uppercase char if convertible, else @a c.
+ * @param __c The char to convert.
+ * @return The uppercase char if convertible, else @a __c.
*/
virtual char_type
- do_toupper(char_type) const;
+ do_toupper(char_type __c) const;
/**
* @brief Convert array to uppercase.
* uppercasing. do_toupper() must always return the same result for
* the same input.
*
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @return @a hi.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @return @a __hi.
*/
virtual const char_type*
do_toupper(char_type* __lo, const char_type* __hi) const;
* lowercasing. do_tolower() must always return the same result for
* the same input.
*
- * @param c The char to convert.
- * @return The lowercase char if convertible, else @a c.
+ * @param __c The char to convert.
+ * @return The lowercase char if convertible, else @a __c.
*/
virtual char_type
- do_tolower(char_type) const;
+ do_tolower(char_type __c) const;
/**
* @brief Convert array to lowercase.
* lowercasing. do_tolower() must always return the same result for
* the same input.
*
- * @param lo Pointer to first char in range.
- * @param hi Pointer to end of range.
- * @return @a hi.
+ * @param __lo Pointer to first char in range.
+ * @param __hi Pointer to end of range.
+ * @return @a __hi.
*/
virtual const char_type*
do_tolower(char_type* __lo, const char_type* __hi) const;
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param c The char to convert.
+ * @param __c The char to convert.
* @return The converted character.
*/
virtual char_type
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @param to Pointer to the destination array.
- * @return @a hi.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @param __to Pointer to the destination array.
+ * @return @a __hi.
*/
virtual const char*
- do_widen(const char* __lo, const char* __hi, char_type* __dest) const
+ do_widen(const char* __lo, const char* __hi, char_type* __to) const
{
- __builtin_memcpy(__dest, __lo, __hi - __lo);
+ __builtin_memcpy(__to, __lo, __hi - __lo);
return __hi;
}
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param c The char to convert.
- * @param dfault Char to return if conversion fails.
+ * @param __c The char to convert.
+ * @param __dfault Char to return if conversion fails.
* @return The converted char.
*/
virtual char
- do_narrow(char_type __c, char) const
+ do_narrow(char_type __c, char __dfault) const
{ return __c; }
/**
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @param dfault Char to use if conversion fails.
- * @param to Pointer to the destination array.
- * @return @a hi.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @param __dfault Char to use if conversion fails.
+ * @param __to Pointer to the destination array.
+ * @return @a __hi.
*/
virtual const char_type*
do_narrow(const char_type* __lo, const char_type* __hi,
- char, char* __dest) const
+ char __dfault, char* __to) const
{
- __builtin_memcpy(__dest, __lo, __hi - __lo);
+ __builtin_memcpy(__to, __lo, __hi - __lo);
return __hi;
}
*
* This is the constructor provided by the standard.
*
- * @param refs Passed to the base facet class.
+ * @param __refs Passed to the base facet class.
*/
explicit
ctype(size_t __refs = 0);
*
* This constructor is used to construct the initial C locale facet.
*
- * @param cloc Handle to C locale data.
- * @param refs Passed to the base facet class.
+ * @param __cloc Handle to C locale data.
+ * @param __refs Passed to the base facet class.
*/
explicit
ctype(__c_locale __cloc, size_t __refs = 0);
* classifying. do_is() must always return the same result for the
* same input.
*
- * @param c The wchar_t to find the mask of.
- * @param m The mask to compare against.
- * @return (M & m) != 0.
+ * @param __c The wchar_t to find the mask of.
+ * @param __m The mask to compare against.
+ * @return (M & __m) != 0.
*/
virtual bool
do_is(mask __m, char_type __c) const;
* classifying. do_is() must always return the same result for the
* same input.
*
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @param vec Pointer to an array of mask storage.
- * @return @a hi.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @param __vec Pointer to an array of mask storage.
+ * @return @a __hi.
*/
virtual const char_type*
do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
* @brief Find wchar_t matching mask
*
* This function searches for and returns the first wchar_t c in
- * [lo,hi) for which is(m,c) is true.
+ * [__lo,__hi) for which is(__m,c) is true.
*
* do_scan_is() is a hook for a derived facet to change the behavior of
* match searching. do_is() must always return the same result for the
* same input.
*
- * @param m The mask to compare against.
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @return Pointer to a matching wchar_t if found, else @a hi.
+ * @param __m The mask to compare against.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @return Pointer to a matching wchar_t if found, else @a __hi.
*/
virtual const char_type*
do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
* @brief Find wchar_t not matching mask
*
* This function searches for and returns a pointer to the first
- * wchar_t c of [lo,hi) for which is(m,c) is false.
+ * wchar_t c of [__lo,__hi) for which is(__m,c) is false.
*
* do_scan_is() is a hook for a derived facet to change the behavior of
* match searching. do_is() must always return the same result for the
* same input.
*
- * @param m The mask to compare against.
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @return Pointer to a non-matching wchar_t if found, else @a hi.
+ * @param __m The mask to compare against.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @return Pointer to a non-matching wchar_t if found, else @a __hi.
*/
virtual const char_type*
do_scan_not(mask __m, const char_type* __lo,
* uppercasing. do_toupper() must always return the same result for
* the same input.
*
- * @param c The wchar_t to convert.
- * @return The uppercase wchar_t if convertible, else @a c.
+ * @param __c The wchar_t to convert.
+ * @return The uppercase wchar_t if convertible, else @a __c.
*/
virtual char_type
- do_toupper(char_type) const;
+ do_toupper(char_type __c) const;
/**
* @brief Convert array to uppercase.
* uppercasing. do_toupper() must always return the same result for
* the same input.
*
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @return @a hi.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @return @a __hi.
*/
virtual const char_type*
do_toupper(char_type* __lo, const char_type* __hi) const;
* lowercasing. do_tolower() must always return the same result for
* the same input.
*
- * @param c The wchar_t to convert.
- * @return The lowercase wchar_t if convertible, else @a c.
+ * @param __c The wchar_t to convert.
+ * @return The lowercase wchar_t if convertible, else @a __c.
*/
virtual char_type
- do_tolower(char_type) const;
+ do_tolower(char_type __c) const;
/**
* @brief Convert array to lowercase.
* lowercasing. do_tolower() must always return the same result for
* the same input.
*
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @return @a hi.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @return @a __hi.
*/
virtual const char_type*
do_tolower(char_type* __lo, const char_type* __hi) const;
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param c The char to convert.
+ * @param __c The char to convert.
* @return The converted wchar_t.
*/
virtual char_type
- do_widen(char) const;
+ do_widen(char __c) const;
/**
* @brief Widen char array to wchar_t array
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param lo Pointer to start range.
- * @param hi Pointer to end of range.
- * @param to Pointer to the destination array.
- * @return @a hi.
+ * @param __lo Pointer to start range.
+ * @param __hi Pointer to end of range.
+ * @param __to Pointer to the destination array.
+ * @return @a __hi.
*/
virtual const char*
- do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
+ do_widen(const char* __lo, const char* __hi, char_type* __to) const;
/**
* @brief Narrow wchar_t to char
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param c The wchar_t to convert.
- * @param dfault Char to return if conversion fails.
+ * @param __c The wchar_t to convert.
+ * @param __dfault Char to return if conversion fails.
* @return The converted char.
*/
virtual char
- do_narrow(char_type, char __dfault) const;
+ do_narrow(char_type __c, char __dfault) const;
/**
* @brief Narrow wchar_t array to char array
* Note: this is not what you want for codepage conversions. See
* codecvt for that.
*
- * @param lo Pointer to start of range.
- * @param hi Pointer to end of range.
- * @param dfault Char to use if conversion fails.
- * @param to Pointer to the destination array.
- * @return @a hi.
+ * @param __lo Pointer to start of range.
+ * @param __hi Pointer to end of range.
+ * @param __dfault Char to use if conversion fails.
+ * @param __to Pointer to the destination array.
+ * @return @a __hi.
*/
virtual const char_type*
do_narrow(const char_type* __lo, const char_type* __hi,
- char __dfault, char* __dest) const;
+ char __dfault, char* __to) const;
// For use at construction time only.
void
};
#endif
-_GLIBCXX_END_NAMESPACE
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace
// Include host and configuration specific ctype inlines.
#include <bits/ctype_inline.h>
-_GLIBCXX_BEGIN_NAMESPACE(std)
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
// 22.2.2 The numeric category.
class __num_base
// Below are the indices into _S_atoms_out.
enum
{
- _S_ominus,
- _S_oplus,
- _S_ox,
- _S_oX,
- _S_odigits,
- _S_odigits_end = _S_odigits + 16,
- _S_oudigits = _S_odigits_end,
- _S_oudigits_end = _S_oudigits + 16,
- _S_oe = _S_odigits + 14, // For scientific notation, 'e'
- _S_oE = _S_oudigits + 14, // For scientific notation, 'E'
+ _S_ominus,
+ _S_oplus,
+ _S_ox,
+ _S_oX,
+ _S_odigits,
+ _S_odigits_end = _S_odigits + 16,
+ _S_oudigits = _S_odigits_end,
+ _S_oudigits_end = _S_oudigits + 16,
+ _S_oe = _S_odigits + 14, // For scientific notation, 'e'
+ _S_oE = _S_oudigits + 14, // For scientific notation, 'E'
_S_oend = _S_oudigits_end
};
bool _M_allocated;
- __numpunct_cache(size_t __refs = 0) : facet(__refs),
- _M_grouping(NULL), _M_grouping_size(0), _M_use_grouping(false),
- _M_truename(NULL), _M_truename_size(0), _M_falsename(NULL),
- _M_falsename_size(0), _M_decimal_point(_CharT()),
- _M_thousands_sep(_CharT()), _M_allocated(false)
- { }
+ __numpunct_cache(size_t __refs = 0)
+ : facet(__refs), _M_grouping(0), _M_grouping_size(0),
+ _M_use_grouping(false),
+ _M_truename(0), _M_truename_size(0), _M_falsename(0),
+ _M_falsename_size(0), _M_decimal_point(_CharT()),
+ _M_thousands_sep(_CharT()), _M_allocated(false)
+ { }
~__numpunct_cache();
private:
__numpunct_cache&
operator=(const __numpunct_cache&);
-
+
explicit
__numpunct_cache(const __numpunct_cache&);
};
/**
* @brief Numpunct constructor.
*
- * @param refs Refcount to pass to the base class.
+ * @param __refs Refcount to pass to the base class.
*/
explicit
- numpunct(size_t __refs = 0) : facet(__refs), _M_data(NULL)
+ numpunct(size_t __refs = 0)
+ : facet(__refs), _M_data(0)
{ _M_initialize_numpunct(); }
/**
* This is a constructor for use by the library itself to set up the
* predefined locale facets.
*
- * @param cache __numpunct_cache object.
- * @param refs Refcount to pass to the base class.
+ * @param __cache __numpunct_cache object.
+ * @param __refs Refcount to pass to the base class.
*/
explicit
numpunct(__cache_type* __cache, size_t __refs = 0)
* This is a constructor for use by the library itself to set up new
* locales.
*
- * @param cloc The C locale.
- * @param refs Refcount to pass to the base class.
+ * @param __cloc The C locale.
+ * @param __refs Refcount to pass to the base class.
*/
explicit
numpunct(__c_locale __cloc, size_t __refs = 0)
- : facet(__refs), _M_data(NULL)
+ : facet(__refs), _M_data(0)
{ _M_initialize_numpunct(__cloc); }
/**
// For use at construction time only.
void
- _M_initialize_numpunct(__c_locale __cloc = NULL);
+ _M_initialize_numpunct(__c_locale __cloc = 0);
};
template<typename _CharT>
~numpunct_byname() { }
};
-_GLIBCXX_BEGIN_LDBL_NAMESPACE
+_GLIBCXX_BEGIN_NAMESPACE_LDBL
/**
* @brief Primary class template num_get.
*
* This is the constructor provided by the standard.
*
- * @param refs Passed to the base facet class.
+ * @param __refs Passed to the base facet class.
*/
explicit
num_get(size_t __refs = 0) : facet(__refs) { }
* except if the value is 1, sets @a v to true, if the value is 0, sets
* @a v to false, and otherwise set err to ios_base::failbit.
*
- * @param in Start of input stream.
- * @param end End of input stream.
- * @param io Source of locale and flags.
- * @param err Error flags to set.
- * @param v Value to format and insert.
+ * @param __in Start of input stream.
+ * @param __end End of input stream.
+ * @param __io Source of locale and flags.
+ * @param __err Error flags to set.
+ * @param __v Value to format and insert.
* @return Iterator after reading.
*/
iter_type
* specifier. Otherwise, parses like %d for signed and %u for unsigned
* types. The matching type length modifier is also used.
*
- * Digit grouping is interpreted according to numpunct::grouping() and
- * numpunct::thousands_sep(). If the pattern of digit groups isn't
- * consistent, sets err to ios_base::failbit.
+ * Digit grouping is interpreted according to
+ * numpunct::grouping() and numpunct::thousands_sep(). If the
+ * pattern of digit groups isn't consistent, sets err to
+ * ios_base::failbit.
*
* If parsing the string yields a valid value for @a v, @a v is set.
* Otherwise, sets err to ios_base::failbit and leaves @a v unaltered.
* Sets err to ios_base::eofbit if the stream is emptied.
*
- * @param in Start of input stream.
- * @param end End of input stream.
- * @param io Source of locale and flags.
- * @param err Error flags to set.
- * @param v Value to format and insert.
+ * @param __in Start of input stream.
+ * @param __end End of input stream.
+ * @param __io Source of locale and flags.
+ * @param __err Error flags to set.
+ * @param __v Value to format and insert.
* @return Iterator after reading.
*/
iter_type
* matching type length modifier is also used.
*
* The decimal point character used is numpunct::decimal_point().
- * Digit grouping is interpreted according to numpunct::grouping() and
- * numpunct::thousands_sep(). If the pattern of digit groups isn't
- * consistent, sets err to ios_base::failbit.
+ * Digit grouping is interpreted according to
+ * numpunct::grouping() and numpunct::thousands_sep(). If the
+ * pattern of digit groups isn't consistent, sets err to
+ * ios_base::failbit.
*
* If parsing the string yields a valid value for @a v, @a v is set.
* Otherwise, sets err to ios_base::failbit and leaves @a v unaltered.
* Sets err to ios_base::eofbit if the stream is emptied.
*
- * @param in Start of input stream.
- * @param end End of input stream.
- * @param io Source of locale and flags.
- * @param err Error flags to set.
- * @param v Value to format and insert.
+ * @param __in Start of input stream.
+ * @param __end End of input stream.
+ * @param __io Source of locale and flags.
+ * @param __err Error flags to set.
+ * @param __v Value to format and insert.
* @return Iterator after reading.
*/
iter_type
*
* The input characters are parsed like the scanf %p specifier.
*
- * Digit grouping is interpreted according to numpunct::grouping() and
- * numpunct::thousands_sep(). If the pattern of digit groups isn't
- * consistent, sets err to ios_base::failbit.
+ * Digit grouping is interpreted according to
+ * numpunct::grouping() and numpunct::thousands_sep(). If the
+ * pattern of digit groups isn't consistent, sets err to
+ * ios_base::failbit.
*
* Note that the digit grouping effect for pointers is a bit ambiguous
* in the standard and shouldn't be relied on. See DR 344.
* Otherwise, sets err to ios_base::failbit and leaves @a v unaltered.
* Sets err to ios_base::eofbit if the stream is emptied.
*
- * @param in Start of input stream.
- * @param end End of input stream.
- * @param io Source of locale and flags.
- * @param err Error flags to set.
- * @param v Value to format and insert.
+ * @param __in Start of input stream.
+ * @param __end End of input stream.
+ * @param __io Source of locale and flags.
+ * @param __err Error flags to set.
+ * @param __v Value to format and insert.
* @return Iterator after reading.
*/
iter_type
string&) const;
template<typename _ValueT>
- iter_type
- _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&,
+ iter_type
+ _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&,
_ValueT&) const;
template<typename _CharT2>
typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, int>::__type
- _M_find(const _CharT2*, size_t __len, _CharT2 __c) const
- {
+ _M_find(const _CharT2*, size_t __len, _CharT2 __c) const
+ {
int __ret = -1;
if (__len <= 10)
{
}
template<typename _CharT2>
- typename __gnu_cxx::__enable_if<!__is_char<_CharT2>::__value,
+ typename __gnu_cxx::__enable_if<!__is_char<_CharT2>::__value,
int>::__type
- _M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const
- {
+ _M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const
+ {
int __ret = -1;
const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c);
if (__q)
* hook for derived classes to change the value returned. @see get()
* for more details.
*
- * @param in Start of input stream.
- * @param end End of input stream.
- * @param io Source of locale and flags.
- * @param err Error flags to set.
- * @param v Value to format and insert.
+ * @param __beg Start of input stream.
+ * @param __end End of input stream.
+ * @param __io Source of locale and flags.
+ * @param __err Error flags to set.
+ * @param __v Value to format and insert.
* @return Iterator after reading.
*/
virtual iter_type
virtual iter_type
do_get(iter_type __beg, iter_type __end, ios_base& __io,
ios_base::iostate& __err, long long& __v) const
- { return _M_extract_int(__beg, __end, __io, __err, __v); }
+ { return _M_extract_int(__beg, __end, __io, __err, __v); }
virtual iter_type
do_get(iter_type __beg, iter_type __end, ios_base& __io,
#endif
virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
- float&) const;
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, float&) const;
virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate&,
double&) const;
// XXX GLIBCXX_ABI Deprecated
#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
virtual iter_type
- __do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ __do_get(iter_type, iter_type, ios_base&, ios_base::iostate&,
double&) const;
#else
virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate&,
long double&) const;
#endif
virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
- void*&) const;
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, void*&) const;
// XXX GLIBCXX_ABI Deprecated
#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
virtual iter_type
- do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+ do_get(iter_type, iter_type, ios_base&, ios_base::iostate&,
long double&) const;
#endif
//@}
*
* This is the constructor provided by the standard.
*
- * @param refs Passed to the base facet class.
+ * @param __refs Passed to the base facet class.
*/
explicit
num_put(size_t __refs = 0) : facet(__refs) { }
* If ios_base::boolalpha is set, writes ctype<CharT>::truename() or
* ctype<CharT>::falsename(). Otherwise formats @a v as an int.
*
- * @param s Stream to write to.
- * @param io Source of locale and flags.
- * @param fill Char_type to use for filling.
- * @param v Value to format and insert.
+ * @param __s Stream to write to.
+ * @param __io Source of locale and flags.
+ * @param __fill Char_type to use for filling.
+ * @param __v Value to format and insert.
* @return Iterator after writing.
*/
iter_type
- put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const
- { return this->do_put(__s, __f, __fill, __v); }
+ put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const
+ { return this->do_put(__s, __io, __fill, __v); }
//@{
/**
* If ios_base::showbase is set, '0' precedes octal values (except 0)
* and '0[xX]' precedes hex values.
*
- * Thousands separators are inserted according to numpunct::grouping()
- * and numpunct::thousands_sep(). The decimal point character used is
- * numpunct::decimal_point().
+ * The decimal point character used is numpunct::decimal_point().
+ * Thousands separators are inserted according to
+ * numpunct::grouping() and numpunct::thousands_sep().
*
* If io.width() is non-zero, enough @a fill characters are inserted to
* make the result at least that wide. If
* immediately after either a '+' or '-' or after '0x' or '0X'.
* Otherwise, padding occurs at the beginning.
*
- * @param s Stream to write to.
- * @param io Source of locale and flags.
- * @param fill Char_type to use for filling.
- * @param v Value to format and insert.
+ * @param __s Stream to write to.
+ * @param __io Source of locale and flags.
+ * @param __fill Char_type to use for filling.
+ * @param __v Value to format and insert.
* @return Iterator after writing.
*/
iter_type
- put(iter_type __s, ios_base& __f, char_type __fill, long __v) const
- { return this->do_put(__s, __f, __fill, __v); }
+ put(iter_type __s, ios_base& __io, char_type __fill, long __v) const
+ { return this->do_put(__s, __io, __fill, __v); }
iter_type
- put(iter_type __s, ios_base& __f, char_type __fill,
+ put(iter_type __s, ios_base& __io, char_type __fill,
unsigned long __v) const
- { return this->do_put(__s, __f, __fill, __v); }
+ { return this->do_put(__s, __io, __fill, __v); }
#ifdef _GLIBCXX_USE_LONG_LONG
iter_type
- put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const
- { return this->do_put(__s, __f, __fill, __v); }
+ put(iter_type __s, ios_base& __io, char_type __fill, long long __v) const
+ { return this->do_put(__s, __io, __fill, __v); }
iter_type
- put(iter_type __s, ios_base& __f, char_type __fill,
+ put(iter_type __s, ios_base& __io, char_type __fill,
unsigned long long __v) const
- { return this->do_put(__s, __f, __fill, __v); }
+ { return this->do_put(__s, __io, __fill, __v); }
#endif
//@}
* If ios_base::showpoint is set, a decimal point will always be
* output.
*
- * Thousands separators are inserted according to numpunct::grouping()
- * and numpunct::thousands_sep(). The decimal point character used is
- * numpunct::decimal_point().
+ * The decimal point character used is numpunct::decimal_point().
+ * Thousands separators are inserted according to
+ * numpunct::grouping() and numpunct::thousands_sep().
*
* If io.width() is non-zero, enough @a fill characters are inserted to
* make the result at least that wide. If
* immediately after either a '+' or '-' or after '0x' or '0X'.
* Otherwise, padding occurs at the beginning.
*
- * @param s Stream to write to.
- * @param io Source of locale and flags.
- * @param fill Char_type to use for filling.
- * @param v Value to format and insert.
+ * @param __s Stream to write to.
+ * @param __io Source of locale and flags.
+ * @param __fill Char_type to use for filling.
+ * @param __v Value to format and insert.
* @return Iterator after writing.
*/
iter_type
- put(iter_type __s, ios_base& __f, char_type __fill, double __v) const
- { return this->do_put(__s, __f, __fill, __v); }
+ put(iter_type __s, ios_base& __io, char_type __fill, double __v) const
+ { return this->do_put(__s, __io, __fill, __v); }
iter_type
- put(iter_type __s, ios_base& __f, char_type __fill,
+ put(iter_type __s, ios_base& __io, char_type __fill,
long double __v) const
- { return this->do_put(__s, __f, __fill, __v); }
+ { return this->do_put(__s, __io, __fill, __v); }
//@}
/**
* This function formats @a v as an unsigned long with ios_base::hex
* and ios_base::showbase set.
*
- * @param s Stream to write to.
- * @param io Source of locale and flags.
- * @param fill Char_type to use for filling.
- * @param v Value to format and insert.
+ * @param __s Stream to write to.
+ * @param __io Source of locale and flags.
+ * @param __fill Char_type to use for filling.
+ * @param __v Value to format and insert.
* @return Iterator after writing.
*/
iter_type
- put(iter_type __s, ios_base& __f, char_type __fill,
+ put(iter_type __s, ios_base& __io, char_type __fill,
const void* __v) const
- { return this->do_put(__s, __f, __fill, __v); }
+ { return this->do_put(__s, __io, __fill, __v); }
protected:
template<typename _ValueT>
- iter_type
- _M_insert_float(iter_type, ios_base& __io, char_type __fill,
+ iter_type
+ _M_insert_float(iter_type, ios_base& __io, char_type __fill,
char __mod, _ValueT __v) const;
void
char_type* __cs, int& __len) const;
template<typename _ValueT>
- iter_type
- _M_insert_int(iter_type, ios_base& __io, char_type __fill,
+ iter_type
+ _M_insert_int(iter_type, ios_base& __io, char_type __fill,
_ValueT __v) const;
void
* inserting them into a stream. This function is a hook for derived
* classes to change the value returned.
*
- * @param s Stream to write to.
- * @param io Source of locale and flags.
- * @param fill Char_type to use for filling.
- * @param v Value to format and insert.
+ * @param __s Stream to write to.
+ * @param __io Source of locale and flags.
+ * @param __fill Char_type to use for filling.
+ * @param __v Value to format and insert.
* @return Iterator after writing.
*/
virtual iter_type
- do_put(iter_type, ios_base&, char_type __fill, bool __v) const;
+ do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const;
virtual iter_type
do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const
- { return _M_insert_int(__s, __io, __fill, __v); }
+ { return _M_insert_int(__s, __io, __fill, __v); }
virtual iter_type
do_put(iter_type __s, ios_base& __io, char_type __fill,
#endif
virtual iter_type
- do_put(iter_type, ios_base&, char_type __fill, double __v) const;
+ do_put(iter_type, ios_base&, char_type, double) const;
// XXX GLIBCXX_ABI Deprecated
#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
virtual iter_type
- __do_put(iter_type, ios_base&, char_type __fill, double __v) const;
+ __do_put(iter_type, ios_base&, char_type, double) const;
#else
virtual iter_type
- do_put(iter_type, ios_base&, char_type __fill, long double __v) const;
+ do_put(iter_type, ios_base&, char_type, long double) const;
#endif
virtual iter_type
- do_put(iter_type, ios_base&, char_type __fill, const void* __v) const;
+ do_put(iter_type, ios_base&, char_type, const void*) const;
// XXX GLIBCXX_ABI Deprecated
#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
virtual iter_type
- do_put(iter_type, ios_base&, char_type __fill, long double __v) const;
+ do_put(iter_type, ios_base&, char_type, long double) const;
#endif
//@}
};
template <typename _CharT, typename _OutIter>
locale::id num_put<_CharT, _OutIter>::id;
-_GLIBCXX_END_LDBL_NAMESPACE
+_GLIBCXX_END_NAMESPACE_LDBL
// Subclause convenience interfaces, inlines.
// NB: These are inline because, when used in a loop, some compilers
/// Convenience interface to ctype.is(ctype_base::lower, __c).
template<typename _CharT>
- inline bool
+ inline bool
islower(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); }
tolower(_CharT __c, const locale& __loc)
{ return use_facet<ctype<_CharT> >(__loc).tolower(__c); }
-_GLIBCXX_END_NAMESPACE
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace std
-#ifndef _GLIBCXX_EXPORT_TEMPLATE
# include <bits/locale_facets.tcc>
-#endif
#endif