Compartilhar via


num_put Class

A template class that describes an object that can serve as a locale facet to control conversions of numeric values to sequences of type CharType.

template<
   class CharType,
   class OutputIterator = ostreambuf_iterator<CharType> 
> class num_put : public locale::facet;

Parameters

  • CharType
    The type used within a program to encode characters in a locale.

  • OutputIterator
    The type of iterator to which the numeric put functions write their output.

Remarks

As with any locale facet, the static object ID has an initial stored value of zero. The first attempt to access its stored value stores a unique positive value in id.

Constructors

num_put

The constructor for objects of type num_put.

Typedefs

char_type

A type that is used to describe a character used by a locale.

iter_type

A type that describes an output iterator.

Member Functions

do_put

A virtual function that is called to convert a number into a sequence of CharTypes that represents the number formatted for a given locale.

put

Converts a number into a sequence of CharTypes which represents the number formatted for a given locale.

Requirements

Header: <locale>

Namespace: std

See Also

Reference

<locale>

facet Class

Thread Safety in the C++ Standard Library