目录
一、程序(文本)——>机器语言(二进制)过程:
预处理:头文件展开、去注释、宏替换、条件编译
编译:把C变成汇编语言
汇编:把汇编变成二进制
链接:把你写的代码和C标准库中的代码合起来
二、过程
};
template<typename _CharT, typename _Traits>
inline bool
operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
const istreambuf_iterator<_CharT, _Traits>& __b)
{ return __a.equal(__b); }
template<typename _CharT, typename _Traits>
inline bool
operator!=(const istreambuf_iterator<_CharT, _Traits>& __a,
const istreambuf_iterator<_CharT, _Traits>& __b)
{ return !__a.equal(__b); }
template<typename _CharT, typename _Traits>
class ostreambuf_iterator
: public iterator<output_iterator_tag, void, void, void, void>
{
public:
typedef _CharT char_type;
typedef _Traits traits_type;
typedef basic_streambuf<_CharT, _Traits> streambuf_type;
typedef basic_ostream<_CharT, _Traits> ostream_type;
template<typename _CharT2>
friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
ostreambuf_iterator<_CharT2> >::__type
copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>,
ostreambuf_iterator<_CharT2>);
private:
streambuf_type* _M_sbuf;
bool _M_failed;
public:
ostreambuf_iterator(ostream_type& __s) throw()
: _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { }
ostreambuf_iterator(streambuf_type* __s) throw()
: _M_sbuf(__s), _M_failed(!_M_sbuf) { }
ostreambuf_iterator&
operator=(_CharT __c)
{
if (!_M_failed &&
_Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof()))
_M_failed = true;
return *this;
}
ostreambuf_iterator&
operator*()
{ return *this; }
ostreambuf_iterator&
operator++(int)
{ return *this; }
ostreambuf_iterator&
operator++()
{ return *this; }
bool
failed() const throw()
{ return _M_failed; }
ostreambuf_iterator&
_M_put(const _CharT* __ws, streamsize __len)
{
if (__builtin_expect(!_M_failed, true)
&& __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len,
false))
_M_failed = true;
return *this;
}
};
template<typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
ostreambuf_iterator<_CharT> >::__type
copy(istreambuf_iterator<_CharT> __first,
istreambuf_iterator<_CharT> __last,
ostreambuf_iterator<_CharT> __result)
{
if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed)
{
bool __ineof;
__copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof);
if (!__ineof)
__result._M_failed = true;
}
return __result;
}
template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
ostreambuf_iterator<_CharT> >::__type
__copy_move_a2(_CharT* __first, _CharT* __last,
ostreambuf_iterator<_CharT> __result)
{
const streamsize __num = __last - __first;
if (__num > 0)
__result._M_put(__first, __num);
return __result;
}
template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
ostreambuf_iterator<_CharT> >::__type
__copy_move_a2(const _CharT* __first, const _CharT* __last,
ostreambuf_iterator<_CharT> __result)
{
const streamsize __num = __last - __first;
if (__num > 0)
__result._M_put(__first, __num);
return __result;
}
template<bool _IsMove, typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
_CharT*>::__type
__copy_move_a2(istreambuf_iterator<_CharT> __first,
istreambuf_iterator<_CharT> __last, _CharT* __result)
{
typedef istreambuf_iterator<_CharT> __is_iterator_type;
typedef typename __is_iterator_type::traits_type traits_type;
typedef typename __is_iterator_type::streambuf_type streambuf_type;
typedef typename traits_type::int_type int_type;
if (__first._M_sbuf && !__last._M_sbuf)
{
streambuf_type* __sb = __first._M_sbuf;
int_type __c = __sb->sgetc();
while (!traits_type::eq_int_type(__c, traits_type::eof()))
{
const streamsize __n = __sb->egptr() - __sb->gptr();
if (__n > 1)
{
traits_type::copy(__result, __sb->gptr(), __n);
__sb->__safe_gbump(__n);
__result += __n;
__c = __sb->underflow();
}
else
{
*__result++ = traits_type::to_char_type(__c);
__c = __sb->snextc();
}
}
}
return __result;
}
template<typename _CharT>
typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
istreambuf_iterator<_CharT> >::__type
find(istreambuf_iterator<_CharT> __first,
istreambuf_iterator<_CharT> __last, const _CharT& __val)
{
typedef istreambuf_iterator<_CharT> __is_iterator_type;
typedef typename __is_iterator_type::traits_type traits_type;
typedef typename __is_iterator_type::streambuf_type streambuf_type;
typedef typename traits_type::int_type int_type;
if (__first._M_sbuf && !__last._M_sbuf)
{
const int_type __ival = traits_type::to_int_type(__val);
streambuf_type* __sb = __first._M_sbuf;
int_type __c = __sb->sgetc();
while (!traits_type::eq_int_type(__c, traits_type::eof())
&& !traits_type::eq_int_type(__c, __ival))
{
streamsize __n = __sb->egptr() - __sb->gptr();
if (__n > 1)
{
const _CharT* __p = traits_type::find(__sb->gptr(),
__n, __val);
if (__p)
__n = __p - __sb->gptr();
__sb->__safe_gbump(__n);
__c = __sb->sgetc();
}
else
__c = __sb->snextc();
}
if (!traits_type::eq_int_type(__c, traits_type::eof()))
__first._M_c = __c;
else
__first._M_sbuf = 0;
}
return __first;
}
}
# 49 "/usr/include/c++/4.8.2/bits/locale_facets.h" 2 3
namespace std __attribute__ ((__visibility__ ("default")))
{
# 64 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
template<typename _Tp>
void
__convert_to_v(const char*, _Tp&, ios_base::iostate&,
const __c_locale&) throw();
template<>
void
__convert_to_v(const char*, float&, ios_base::iostate&,
const __c_locale&) throw();
template<>
void
__convert_to_v(const char*, double&, ios_base::iostate&,
const __c_locale&) throw();
template<>
void
__convert_to_v(const char*, long double&, ios_base::iostate&,
const __c_locale&) throw();
template<typename _CharT, typename _Traits>
struct __pad
{
static void
_S_pad(ios_base& __io, _CharT __fill, _CharT* __news,
const _CharT* __olds, streamsize __newlen, streamsize __oldlen);
};
template<typename _CharT>
_CharT*
__add_grouping(_CharT* __s, _CharT __sep,
const char* __gbeg, size_t __gsize,
const _CharT* __first, const _CharT* __last);
template<typename _CharT>
inline
ostreambuf_iterator<_CharT>
__write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len)
{
__s._M_put(__ws, __len);
return __s;
}
template<typename _CharT, typename _OutIter>
inline
_OutIter
__write(_OutIter __s, const _CharT* __ws, int __len)
{
for (int __j = 0; __j < __len; __j++, ++__s)
*__s = __ws[__j];
return __s;
}
# 142 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
template<typename _CharT>
class __ctype_abstract_base : public locale::facet, public ctype_base
{
public:
typedef _CharT char_type;
# 161 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
bool
is(mask __m, char_type __c) const
{ return this->do_is(__m, __c); }
# 178 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
const char_type*
is(const char_type *__lo, const char_type *__hi, mask *__vec) const
{ return this->do_is(__lo, __hi, __vec); }
# 194 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
const char_type*
scan_is(mask __m, const char_type* __lo, const char_type* __hi) const
{ return this->do_scan_is(__m, __lo, __hi); }
# 210 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
const char_type*
scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
{ return this->do_scan_not(__m, __lo, __hi); }
# 224 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
char_type
toupper(char_type __c) const
{ return this->do_toupper(__c); }
# 239 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
const char_type*
toupper(char_type *__lo, const char_type* __hi) const
{ return this->do_toupper(__lo, __hi); }
# 253 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
char_type
tolower(char_type __c) const
{ return this->do_tolower(__c); }
# 268 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
const char_type*
tolower(char_type* __lo, const char_type* __hi) const
{ return this->do_tolower(__lo, __hi); }
# 285 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
char_type
widen(char __c) const
{ return this->do_widen(__c); }
# 304 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
const char*
widen(const char* __lo, const char* __hi, char_type* __to) const
{ return this->do_widen(__lo, __hi, __to); }
# 323 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
char
narrow(char_type __c, char __dfault) const
{ return this->do_narrow(__c, __dfault); }
# 345 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
const char_type*
narrow(const char_type* __lo, const char_type* __hi,
char __dfault, char* __to) const
{ return this->do_narrow(__lo, __hi, __dfault, __to); }
protected:
explicit
__ctype_abstract_base(size_t __refs = 0): facet(__refs) { }
virtual
~__ctype_abstract_base() { }
# 370 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual bool
do_is(mask __m, char_type __c) const = 0;
# 389 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual const char_type*
do_is(const char_type* __lo, const char_type* __hi,
mask* __vec) const = 0;
# 408 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual const char_type*
do_scan_is(mask __m, const char_type* __lo,
const char_type* __hi) const = 0;
# 427 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual const char_type*
do_scan_not(mask __m, const char_type* __lo,
const char_type* __hi) const = 0;
# 445 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual char_type
do_toupper(char_type __c) const = 0;
# 462 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual const char_type*
do_toupper(char_type* __lo, const char_type* __hi) const = 0;
# 478 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual char_type
do_tolower(char_type __c) const = 0;
# 495 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual const char_type*
do_tolower(char_type* __lo, const char_type* __hi) const = 0;
# 514 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual char_type
do_widen(char __c) const = 0;
# 535 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual const char*
do_widen(const char* __lo, const char* __hi, char_type* __to) const = 0;
# 556 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual char
do_narrow(char_type __c, char __dfault) const = 0;
# 581 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual const char_type*
do_narrow(const char_type* __lo, const char_type* __hi,
char __dfault, char* __to) const = 0;
};
# 604 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
template<typename _CharT>
class ctype : public __ctype_abstract_base<_CharT>
{
public:
typedef _CharT char_type;
typedef typename __ctype_abstract_base<_CharT>::mask mask;
static locale::id id;
explicit
ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { }
protected:
virtual
~ctype();
virtual bool
do_is(mask __m, char_type __c) const;
virtual const char_type*
do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
virtual const char_type*
do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
virtual const char_type*
do_scan_not(mask __m, const char_type* __lo,
const char_type* __hi) const;
virtual char_type
do_toupper(char_type __c) const;
virtual const char_type*
do_toupper(char_type* __lo, const char_type* __hi) const;
virtual char_type
do_tolower(char_type __c) const;
virtual const char_type*
do_tolower(char_type* __lo, const char_type* __hi) const;
virtual char_type
do_widen(char __c) const;
virtual const char*
do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
virtual char
do_narrow(char_type, char __dfault) const;
virtual const char_type*
do_narrow(const char_type* __lo, const char_type* __hi,
char __dfault, char* __to) const;
};
template<typename _CharT>
locale::id ctype<_CharT>::id;
# 673 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
template<>
class ctype<char> : public locale::facet, public ctype_base
{
public:
typedef char char_type;
protected:
__c_locale _M_c_locale_ctype;
bool _M_del;
__to_type _M_toupper;
__to_type _M_tolower;
const mask* _M_table;
mutable char _M_widen_ok;
mutable char _M_widen[1 + static_cast<unsigned char>(-1)];
mutable char _M_narrow[1 + static_cast<unsigned char>(-1)];
mutable char _M_narrow_ok;
public:
static locale::id id;
static const size_t table_size = 1 + static_cast<unsigned char>(-1);
# 710 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
explicit
ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0);
# 723 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
explicit
ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false,
size_t __refs = 0);
# 736 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
inline bool
is(mask __m, char __c) const;
# 751 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
inline const char*
is(const char* __lo, const char* __hi, mask* __vec) const;
# 765 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
inline const char*
scan_is(mask __m, const char* __lo, const char* __hi) const;
# 779 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
inline const char*
scan_not(mask __m, const char* __lo, const char* __hi) const;
# 794 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
char_type
toupper(char_type __c) const
{ return this->do_toupper(__c); }
# 811 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
const char_type*
toupper(char_type *__lo, const char_type* __hi) const
{ return this->do_toupper(__lo, __hi); }
# 827 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
char_type
tolower(char_type __c) const
{ return this->do_tolower(__c); }
# 844 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
const char_type*
tolower(char_type* __lo, const char_type* __hi) const
{ return this->do_tolower(__lo, __hi); }
# 864 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
char_type
widen(char __c) const
{
if (_M_widen_ok)
return _M_widen[static_cast<unsigned char>(__c)];
this->_M_widen_init();
return this->do_widen(__c);
}
# 891 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
const char*
widen(const char* __lo, const char* __hi, char_type* __to) const
{
if (_M_widen_ok == 1)
{
__builtin_memcpy(__to, __lo, __hi - __lo);
return __hi;
}
if (!_M_widen_ok)
_M_widen_init();
return this->do_widen(__lo, __hi, __to);
}
# 922 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
char
narrow(char_type __c, char __dfault) const
{
if (_M_narrow[static_cast<unsigned char>(__c)])
return _M_narrow[static_cast<unsigned char>(__c)];
const char __t = do_narrow(__c, __dfault);
if (__t != __dfault)
_M_narrow[static_cast<unsigned char>(__c)] = __t;
return __t;
}
# 955 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
const char_type*
narrow(const char_type* __lo, const char_type* __hi,
char __dfault, char* __to) const
{
if (__builtin_expect(_M_narrow_ok == 1, true))
{
__builtin_memcpy(__to, __lo, __hi - __lo);
return __hi;
}
if (!_M_narrow_ok)
_M_narrow_init();
return this->do_narrow(__lo, __hi, __dfault, __to);
}
const mask*
table() const throw()
{ return _M_table; }
static const mask*
classic_table() throw();
protected:
virtual
~ctype();
# 1004 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual char_type
do_toupper(char_type __c) const;
# 1021 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual const char_type*
do_toupper(char_type* __lo, const char_type* __hi) const;
# 1037 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual char_type
do_tolower(char_type __c) const;
# 1054 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual const char_type*
do_tolower(char_type* __lo, const char_type* __hi) const;
# 1074 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual char_type
do_widen(char __c) const
{ return __c; }
# 1097 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual const char*
do_widen(const char* __lo, const char* __hi, char_type* __to) const
{
__builtin_memcpy(__to, __lo, __hi - __lo);
return __hi;
}
# 1123 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual char
do_narrow(char_type __c, char __dfault) const
{ return __c; }
# 1149 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual const char_type*
do_narrow(const char_type* __lo, const char_type* __hi,
char __dfault, char* __to) const
{
__builtin_memcpy(__to, __lo, __hi - __lo);
return __hi;
}
private:
void _M_narrow_init() const;
void _M_widen_init() const;
};
# 1174 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
template<>
class ctype<wchar_t> : public __ctype_abstract_base<wchar_t>
{
public:
typedef wchar_t char_type;
typedef wctype_t __wmask_type;
protected:
__c_locale _M_c_locale_ctype;
bool _M_narrow_ok;
char _M_narrow[128];
wint_t _M_widen[1 + static_cast<unsigned char>(-1)];
mask _M_bit[16];
__wmask_type _M_wmask[16];
public:
static locale::id id;
# 1207 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
explicit
ctype(size_t __refs = 0);
# 1218 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
explicit
ctype(__c_locale __cloc, size_t __refs = 0);
protected:
__wmask_type
_M_convert_to_wmask(const mask __m) const throw();
virtual
~ctype();
# 1242 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual bool
do_is(mask __m, char_type __c) const;
# 1261 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual const char_type*
do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
# 1279 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual const char_type*
do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
# 1297 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual const char_type*
do_scan_not(mask __m, const char_type* __lo,
const char_type* __hi) const;
# 1314 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual char_type
do_toupper(char_type __c) const;
# 1331 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual const char_type*
do_toupper(char_type* __lo, const char_type* __hi) const;
# 1347 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual char_type
do_tolower(char_type __c) const;
# 1364 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual const char_type*
do_tolower(char_type* __lo, const char_type* __hi) const;
# 1384 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual char_type
do_widen(char __c) const;
# 1406 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual const char*
do_widen(const char* __lo, const char* __hi, char_type* __to) const;
# 1429 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual char
do_narrow(char_type __c, char __dfault) const;
# 1455 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual const char_type*
do_narrow(const char_type* __lo, const char_type* __hi,
char __dfault, char* __to) const;
void
_M_initialize_ctype() throw();
};
template<typename _CharT>
class ctype_byname : public ctype<_CharT>
{
public:
typedef typename ctype<_CharT>::mask mask;
explicit
ctype_byname(const char* __s, size_t __refs = 0);
protected:
virtual
~ctype_byname() { };
};
template<>
class ctype_byname<char> : public ctype<char>
{
public:
explicit
ctype_byname(const char* __s, size_t __refs = 0);
protected:
virtual
~ctype_byname();
};
template<>
class ctype_byname<wchar_t> : public ctype<wchar_t>
{
public:
explicit
ctype_byname(const char* __s, size_t __refs = 0);
protected:
virtual
~ctype_byname();
};
}
# 1 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/ctype_inline.h" 1 3
# 37 "/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/ctype_inline.h" 3
namespace std __attribute__ ((__visibility__ ("default")))
{
bool
ctype<char>::
is(mask __m, char __c) const
{ return _M_table[static_cast<unsigned char>(__c)] & __m; }
const char*
ctype<char>::
is(const char* __low, const char* __high, mask* __vec) const
{
while (__low < __high)
*__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
return __high;
}
const char*
ctype<char>::
scan_is(mask __m, const char* __low, const char* __high) const
{
while (__low < __high
&& !(_M_table[static_cast<unsigned char>(*__low)] & __m))
++__low;
return __low;
}
const char*
ctype<char>::
scan_not(mask __m, const char* __low, const char* __high) const
{
while (__low < __high
&& (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
++__low;
return __low;
}
}
# 1512 "/usr/include/c++/4.8.2/bits/locale_facets.h" 2 3
namespace std __attribute__ ((__visibility__ ("default")))
{
class __num_base
{
public:
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,
_S_oE = _S_oudigits + 14,
_S_oend = _S_oudigits_end
};
static const char* _S_atoms_out;
static const char* _S_atoms_in;
enum
{
_S_iminus,
_S_iplus,
_S_ix,
_S_iX,
_S_izero,
_S_ie = _S_izero + 14,
_S_iE = _S_izero + 20,
_S_iend = 26
};
static void
_S_format_float(const ios_base& __io, char* __fptr, char __mod) throw();
};
template<typename _CharT>
struct __numpunct_cache : public locale::facet
{
const char* _M_grouping;
size_t _M_grouping_size;
bool _M_use_grouping;
const _CharT* _M_truename;
size_t _M_truename_size;
const _CharT* _M_falsename;
size_t _M_falsename_size;
_CharT _M_decimal_point;
_CharT _M_thousands_sep;
_CharT _M_atoms_out[__num_base::_S_oend];
_CharT _M_atoms_in[__num_base::_S_iend];
bool _M_allocated;
__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();
void
_M_cache(const locale& __loc);
private:
__numpunct_cache&
operator=(const __numpunct_cache&);
explicit
__numpunct_cache(const __numpunct_cache&);
};
template<typename _CharT>
__numpunct_cache<_CharT>::~__numpunct_cache()
{
if (_M_allocated)
{
delete [] _M_grouping;
delete [] _M_truename;
delete [] _M_falsename;
}
}
# 1640 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
template<typename _CharT>
class numpunct : public locale::facet
{
public:
typedef _CharT char_type;
typedef basic_string<_CharT> string_type;
typedef __numpunct_cache<_CharT> __cache_type;
protected:
__cache_type* _M_data;
public:
static locale::id id;
explicit
numpunct(size_t __refs = 0)
: facet(__refs), _M_data(0)
{ _M_initialize_numpunct(); }
# 1678 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
explicit
numpunct(__cache_type* __cache, size_t __refs = 0)
: facet(__refs), _M_data(__cache)
{ _M_initialize_numpunct(); }
# 1692 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
explicit
numpunct(__c_locale __cloc, size_t __refs = 0)
: facet(__refs), _M_data(0)
{ _M_initialize_numpunct(__cloc); }
# 1706 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
char_type
decimal_point() const
{ return this->do_decimal_point(); }
# 1719 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
char_type
thousands_sep() const
{ return this->do_thousands_sep(); }
# 1750 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
string
grouping() const
{ return this->do_grouping(); }
# 1763 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
string_type
truename() const
{ return this->do_truename(); }
# 1776 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
string_type
falsename() const
{ return this->do_falsename(); }
protected:
virtual
~numpunct();
# 1793 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual char_type
do_decimal_point() const
{ return _M_data->_M_decimal_point; }
# 1805 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual char_type
do_thousands_sep() const
{ return _M_data->_M_thousands_sep; }
# 1818 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual string
do_grouping() const
{ return _M_data->_M_grouping; }
# 1831 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual string_type
do_truename() const
{ return _M_data->_M_truename; }
# 1844 "/usr/include/c++/4.8.2/bits/locale_facets.h" 3
virtual string_type
do_falsename() const
{ return _M_data->_M_falsename; }
void
_M_initialize_numpunct(__c_locale __cloc = 0);
};
template<typename _CharT>
locale::id numpunct<_CharT>::id;
template<>
numpunct<char>::~numpunct();
template<>
void
numpunct<char>::_M_initialize_numpunct(__c_locale __cloc);
template<>
numpunct<wchar_t>::~numpunct();
template<>
void
numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc);
template<typename _CharT>
class numpunct_byname : public numpunct<_CharT>
{
public:
typedef _CharT char_type;
typedef basic_string<_CharT> string_type;
explicit
numpunct_byname(const char* __s, size_t __refs = 0)
: numpunct<_CharT>(__refs)
{
if (__builtin_strcmp(__s, "C") != 0
&& __builtin_strcmp(__s, "POSIX") != 0)
{
__c_locale __tmp;
this->_S_create_c_locale(__tmp, __s);
this->_M_initialize_numpunct(__tmp);
this->_S_destroy_c_locale(__tmp);
}
}
protected:
virtual
~numpunct_byna