mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 12:00:03 -05:00
[multiple changes]
2002-03-08 Benjamin Kosnik <bkoz@redhat.com> * include/std/std_limits.h: Move static const data members out of generic template, into base class __numeric_limits_base. * src/limits.cc: Add definitions. * config/linker-map.gnu: Add __numeric_limits_base. * testsuite/18_support/numeric_limits.cc: Declare test in scope. 2002-03-07 Benjamin Kosnik <bkoz@redhat.com> * include/bits/stl_alloc.h: Add extern implicit allocator instantiations. * include/bits/basic_string.tcc: Tweak. * include/bits/loqcale_facets.tcc: Remove default args. Add has_facet, use_facet extern instantiations. * src/stl-inst.cc: Add explicit instantiation. * src/locale-inst.cc: Clean. Remove locale member template instantiations. * testsuite/22_locale/operators.cc (test02): Enable. 2002-03-06 Benjamin Kosnik <bkoz@redhat.com> Stephen M. Webb <stephen.webb@bregmasoft.com> * include/bits/stl_tree.h (_S_rb_tree_red): Make enum. (_S_rb_tree_black): Make enum. Clean. Format. * include/bits/stl_bvector.h (__WORD_BIT): To _M_word_bit, enum. * include/bits/stl_algo.h (__stl_chunk_size): _M_chunk_size, enum. (__stl_threshold): _M_threshold, enum. * src/stl-inst.cc: Same. * config/linker-map.gnu: Remove. * testsuite/23_containers/vector_bool.cc: New. Co-Authored-By: Stephen M. Webb <stephen.webb@bregmasoft.com> From-SVN: r50459
This commit is contained in:
committed by
Benjamin Kosnik
parent
2c0953e62a
commit
5a6ecc810b
@@ -1,3 +1,38 @@
|
||||
2002-03-08 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* include/std/std_limits.h: Move static const data members out of
|
||||
generic template, into base class __numeric_limits_base.
|
||||
* src/limits.cc: Add definitions.
|
||||
* config/linker-map.gnu: Add __numeric_limits_base.
|
||||
* testsuite/18_support/numeric_limits.cc: Declare test in scope.
|
||||
|
||||
2002-03-07 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* include/bits/stl_alloc.h: Add extern implicit allocator
|
||||
instantiations.
|
||||
* include/bits/basic_string.tcc: Tweak.
|
||||
* include/bits/loqcale_facets.tcc: Remove default args. Add
|
||||
has_facet, use_facet extern instantiations.
|
||||
* src/stl-inst.cc: Add explicit instantiation.
|
||||
* src/locale-inst.cc: Clean. Remove locale member template
|
||||
instantiations.
|
||||
|
||||
* testsuite/22_locale/operators.cc (test02): Enable.
|
||||
|
||||
2002-03-06 Benjamin Kosnik <bkoz@redhat.com>
|
||||
Stephen M. Webb <stephen.webb@bregmasoft.com>
|
||||
|
||||
* include/bits/stl_tree.h (_S_rb_tree_red): Make enum.
|
||||
(_S_rb_tree_black): Make enum.
|
||||
Clean. Format.
|
||||
* include/bits/stl_bvector.h (__WORD_BIT): To _M_word_bit, enum.
|
||||
* include/bits/stl_algo.h (__stl_chunk_size): _M_chunk_size, enum.
|
||||
(__stl_threshold): _M_threshold, enum.
|
||||
* src/stl-inst.cc: Same.
|
||||
* config/linker-map.gnu: Remove.
|
||||
|
||||
* testsuite/23_containers/vector_bool.cc: New.
|
||||
|
||||
2002-03-08 Phil Edwards <pme@gcc.gnu.org>
|
||||
|
||||
* include/bits/basic_string.h (basic_string::_S_construct): Fix
|
||||
@@ -114,6 +149,16 @@
|
||||
* testsuite/27_io/ios_manip_basefield.cc (test01): Tweak existing
|
||||
tests, add a few more.
|
||||
|
||||
2002-02-25 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* src/ios.cc (ios_base::~ios_base): Tweak.
|
||||
(ios_base::_M_call_callbacks): Deal with null __p.
|
||||
(ios_base::ios_base): Set _M_callbacks.
|
||||
* include/bits/basic_ios.tcc (basic_ios::init): Adjust comment.
|
||||
* testsuite/27_io/ios_init.cc (test02): Fix.
|
||||
|
||||
* mkcheck.in (static_fail): Failed links go to output file.
|
||||
|
||||
2002-02-25 Phil Edwards <pme@gcc.gnu.org>
|
||||
|
||||
* docs/html/faq/index.html: Update.
|
||||
|
||||
@@ -33,10 +33,12 @@ GLIBCPP_3.1 {
|
||||
std::__throw_*;
|
||||
std::__basic_file*;
|
||||
std::__num_base*;
|
||||
std::__timepunct*
|
||||
std::__timepunct*;
|
||||
std::__numeric_limits_base*
|
||||
};
|
||||
|
||||
# Names not in an 'extern' block are mangled names.
|
||||
_ZSt9has_facet*;
|
||||
|
||||
# operator new(unsigned)
|
||||
_Znwj;
|
||||
@@ -82,18 +84,6 @@ GLIBCPP_3.1 {
|
||||
_ZTv*;
|
||||
_ZTc*;
|
||||
|
||||
# std::_S_rb_tree_red
|
||||
_ZSt14_S_rb_tree_red;
|
||||
|
||||
# std::_S_rb_tree_black
|
||||
_ZSt16_S_rb_tree_black;
|
||||
|
||||
# std::__stl_threshold
|
||||
_ZSt15__stl_threshold;
|
||||
|
||||
# std::__stl_chunk_size
|
||||
_ZSt16__stl_chunk_size;
|
||||
|
||||
# std::__convert_to_v
|
||||
_ZSt14__convert_to_v*;
|
||||
|
||||
@@ -113,4 +103,3 @@ CXXABI_1 {
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
||||
|
||||
@@ -945,7 +945,7 @@ namespace std
|
||||
// which are defined via explicit instantiations elsewhere.
|
||||
// NB: This syntax is a GNU extension.
|
||||
extern template class basic_string<char>;
|
||||
extern template
|
||||
extern template
|
||||
basic_istream<char>&
|
||||
operator>>(basic_istream<char>&, string&);
|
||||
extern template
|
||||
|
||||
@@ -2061,36 +2061,38 @@ namespace std
|
||||
// Inhibit implicit instantiations for required instantiations,
|
||||
// which are defined via explicit instantiations elsewhere.
|
||||
// NB: This syntax is a GNU extension.
|
||||
extern template class vector<locale::facet*>;
|
||||
|
||||
extern template class moneypunct<char, false>;
|
||||
extern template class moneypunct<char, true>;
|
||||
extern template class moneypunct_byname<char, false>;
|
||||
extern template class moneypunct_byname<char, true>;
|
||||
extern template class money_get<char, istreambuf_iterator<char> >;
|
||||
extern template class money_put<char, ostreambuf_iterator<char> >;
|
||||
extern template class money_get<char>;
|
||||
extern template class money_put<char>;
|
||||
extern template class moneypunct<wchar_t, false>;
|
||||
extern template class moneypunct<wchar_t, true>;
|
||||
extern template class moneypunct_byname<wchar_t, false>;
|
||||
extern template class moneypunct_byname<wchar_t, true>;
|
||||
extern template class money_get<wchar_t, istreambuf_iterator<wchar_t> >;
|
||||
extern template class money_put<wchar_t, ostreambuf_iterator<wchar_t> >;
|
||||
extern template class money_get<wchar_t>;
|
||||
extern template class money_put<wchar_t>;
|
||||
extern template class numpunct<char>;
|
||||
extern template class numpunct_byname<char>;
|
||||
extern template class num_get<char, istreambuf_iterator<char> >;
|
||||
extern template class num_put<char, ostreambuf_iterator<char> >;
|
||||
extern template class num_get<char>;
|
||||
extern template class num_put<char>;
|
||||
extern template class numpunct<wchar_t>;
|
||||
extern template class numpunct_byname<wchar_t>;
|
||||
extern template class num_get<wchar_t, istreambuf_iterator<wchar_t> >;
|
||||
extern template class num_put<wchar_t, ostreambuf_iterator<wchar_t> >;
|
||||
extern template class num_get<wchar_t>;
|
||||
extern template class num_put<wchar_t>;
|
||||
extern template class __timepunct<char>;
|
||||
extern template class time_put<char, ostreambuf_iterator<char> >;
|
||||
extern template class time_put_byname<char, ostreambuf_iterator<char> >;
|
||||
extern template class time_get<char, istreambuf_iterator<char> >;
|
||||
extern template class time_get_byname<char, istreambuf_iterator<char> >;
|
||||
extern template class time_put<char>;
|
||||
extern template class time_put_byname<char>;
|
||||
extern template class time_get<char>;
|
||||
extern template class time_get_byname<char>;
|
||||
extern template class __timepunct<wchar_t>;
|
||||
extern template class time_put<wchar_t, ostreambuf_iterator<wchar_t> >;
|
||||
extern template class time_put_byname<wchar_t, ostreambuf_iterator<wchar_t> >;
|
||||
extern template class time_get<wchar_t, istreambuf_iterator<wchar_t> >;
|
||||
extern template class time_get_byname<wchar_t, istreambuf_iterator<wchar_t> >;
|
||||
extern template class time_put<wchar_t>;
|
||||
extern template class time_put_byname<wchar_t>;
|
||||
extern template class time_get<wchar_t>;
|
||||
extern template class time_get_byname<wchar_t>;
|
||||
extern template class messages<char>;
|
||||
extern template class messages_byname<char>;
|
||||
extern template class messages<wchar_t>;
|
||||
@@ -2103,13 +2105,217 @@ namespace std
|
||||
extern template class collate_byname<char>;
|
||||
extern template class collate<wchar_t>;
|
||||
extern template class collate_byname<wchar_t>;
|
||||
|
||||
extern template
|
||||
const codecvt<char, char, mbstate_t>&
|
||||
use_facet<codecvt<char, char, mbstate_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
const collate<char>&
|
||||
use_facet<collate<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
const numpunct<char>&
|
||||
use_facet<numpunct<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
const num_put<char>&
|
||||
use_facet<num_put<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
const num_get<char>&
|
||||
use_facet<num_get<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
const moneypunct<char, true>&
|
||||
use_facet<moneypunct<char, true> >(const locale&);
|
||||
|
||||
extern template
|
||||
const moneypunct<char, false>&
|
||||
use_facet<moneypunct<char, false> >(const locale&);
|
||||
|
||||
extern template
|
||||
const money_put<char>&
|
||||
use_facet<money_put<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
const money_get<char>&
|
||||
use_facet<money_get<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
const __timepunct<char>&
|
||||
use_facet<__timepunct<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
const time_put<char>&
|
||||
use_facet<time_put<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
const time_get<char>&
|
||||
use_facet<time_get<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
const messages<char>&
|
||||
use_facet<messages<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
const codecvt<wchar_t, char, mbstate_t>&
|
||||
use_facet<codecvt<wchar_t, char, mbstate_t> >(locale const&);
|
||||
|
||||
extern template
|
||||
const collate<wchar_t>&
|
||||
use_facet<collate<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
const numpunct<wchar_t>&
|
||||
use_facet<numpunct<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
const num_put<wchar_t>&
|
||||
use_facet<num_put<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
const num_get<wchar_t>&
|
||||
use_facet<num_get<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
const moneypunct<wchar_t, true>&
|
||||
use_facet<moneypunct<wchar_t, true> >(const locale&);
|
||||
|
||||
extern template
|
||||
const moneypunct<wchar_t, false>&
|
||||
use_facet<moneypunct<wchar_t, false> >(const locale&);
|
||||
|
||||
extern template
|
||||
const money_put<wchar_t>&
|
||||
use_facet<money_put<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
const money_get<wchar_t>&
|
||||
use_facet<money_get<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
const __timepunct<wchar_t>&
|
||||
use_facet<__timepunct<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
const time_put<wchar_t>&
|
||||
use_facet<time_put<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
const time_get<wchar_t>&
|
||||
use_facet<time_get<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
const messages<wchar_t>&
|
||||
use_facet<messages<wchar_t> >(const locale&);
|
||||
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<ctype<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<codecvt<char, char, mbstate_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<collate<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<numpunct<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<num_put<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<num_get<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<moneypunct<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<money_put<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<money_get<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<__timepunct<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<time_put<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<time_get<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<messages<char> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<ctype<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<collate<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<numpunct<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<num_put<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<num_get<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<moneypunct<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<money_put<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<money_get<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<__timepunct<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<time_put<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<time_get<wchar_t> >(const locale&);
|
||||
|
||||
extern template
|
||||
bool
|
||||
has_facet<messages<wchar_t> >(const locale&);
|
||||
} // namespace std
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1889,7 +1889,7 @@ __result, __binary_pred, _IterType());
|
||||
* This controls some aspect of the sort routines.
|
||||
* @endmaint
|
||||
*/
|
||||
extern const int __stl_threshold;
|
||||
enum { _M_threshold = 16 };
|
||||
|
||||
/**
|
||||
* @maint
|
||||
@@ -2016,9 +2016,9 @@ __result, __binary_pred, _IterType());
|
||||
void
|
||||
__final_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last)
|
||||
{
|
||||
if (__last - __first > __stl_threshold) {
|
||||
__insertion_sort(__first, __first + __stl_threshold);
|
||||
__unguarded_insertion_sort(__first + __stl_threshold, __last);
|
||||
if (__last - __first > _M_threshold) {
|
||||
__insertion_sort(__first, __first + _M_threshold);
|
||||
__unguarded_insertion_sort(__first + _M_threshold, __last);
|
||||
}
|
||||
else
|
||||
__insertion_sort(__first, __last);
|
||||
@@ -2034,9 +2034,9 @@ __result, __binary_pred, _IterType());
|
||||
__final_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last,
|
||||
_Compare __comp)
|
||||
{
|
||||
if (__last - __first > __stl_threshold) {
|
||||
__insertion_sort(__first, __first + __stl_threshold, __comp);
|
||||
__unguarded_insertion_sort(__first + __stl_threshold, __last, __comp);
|
||||
if (__last - __first > _M_threshold) {
|
||||
__insertion_sort(__first, __first + _M_threshold, __comp);
|
||||
__unguarded_insertion_sort(__first + _M_threshold, __last, __comp);
|
||||
}
|
||||
else
|
||||
__insertion_sort(__first, __last, __comp);
|
||||
@@ -2068,7 +2068,7 @@ __result, __binary_pred, _IterType());
|
||||
{
|
||||
typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
|
||||
|
||||
while (__last - __first > __stl_threshold) {
|
||||
while (__last - __first > _M_threshold) {
|
||||
if (__depth_limit == 0) {
|
||||
partial_sort(__first, __last, __last);
|
||||
return;
|
||||
@@ -2096,7 +2096,7 @@ __result, __binary_pred, _IterType());
|
||||
{
|
||||
typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
|
||||
|
||||
while (__last - __first > __stl_threshold) {
|
||||
while (__last - __first > _M_threshold) {
|
||||
if (__depth_limit == 0) {
|
||||
partial_sort(__first, __last, __last, __comp);
|
||||
return;
|
||||
@@ -2253,7 +2253,7 @@ __result, __binary_pred, _IterType());
|
||||
__comp);
|
||||
}
|
||||
|
||||
extern const int __stl_chunk_size;
|
||||
enum { _M_chunk_size = 7 };
|
||||
|
||||
template<typename _RandomAccessIter, typename _Distance>
|
||||
void
|
||||
@@ -2289,7 +2289,7 @@ __result, __binary_pred, _IterType());
|
||||
_Distance __len = __last - __first;
|
||||
_Pointer __buffer_last = __buffer + __len;
|
||||
|
||||
_Distance __step_size = __stl_chunk_size;
|
||||
_Distance __step_size = _M_chunk_size;
|
||||
__chunk_insertion_sort(__first, __last, __step_size);
|
||||
|
||||
while (__step_size < __len) {
|
||||
@@ -2310,7 +2310,7 @@ __result, __binary_pred, _IterType());
|
||||
_Distance __len = __last - __first;
|
||||
_Pointer __buffer_last = __buffer + __len;
|
||||
|
||||
_Distance __step_size = __stl_chunk_size;
|
||||
_Distance __step_size = _M_chunk_size;
|
||||
__chunk_insertion_sort(__first, __last, __step_size, __comp);
|
||||
|
||||
while (__step_size < __len) {
|
||||
|
||||
@@ -922,6 +922,11 @@ struct _Alloc_traits<_Tp, __allocator<_Tp1, __debug_alloc<_Alloc> > >
|
||||
};
|
||||
//@}
|
||||
|
||||
// Inhibit implicit instantiations for required instantiations,
|
||||
// which are defined via explicit instantiations elsewhere.
|
||||
// NB: This syntax is a GNU extension.
|
||||
extern template class allocator<char>;
|
||||
extern template class allocator<wchar_t>;
|
||||
} // namespace std
|
||||
|
||||
#endif /* __GLIBCPP_INTERNAL_ALLOC_H */
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
namespace std
|
||||
{
|
||||
extern const int __WORD_BIT;
|
||||
enum { _M_word_bit = int(CHAR_BIT * sizeof(unsigned long)) };
|
||||
|
||||
struct _Bit_reference {
|
||||
unsigned int* _M_p;
|
||||
@@ -106,24 +106,24 @@ struct _Bit_iterator_base : public iterator<random_access_iterator_tag, bool>
|
||||
: _M_p(__x), _M_offset(__y) {}
|
||||
|
||||
void _M_bump_up() {
|
||||
if (_M_offset++ == __WORD_BIT - 1) {
|
||||
if (_M_offset++ == _M_word_bit - 1) {
|
||||
_M_offset = 0;
|
||||
++_M_p;
|
||||
}
|
||||
}
|
||||
void _M_bump_down() {
|
||||
if (_M_offset-- == 0) {
|
||||
_M_offset = __WORD_BIT - 1;
|
||||
_M_offset = _M_word_bit - 1;
|
||||
--_M_p;
|
||||
}
|
||||
}
|
||||
|
||||
void _M_incr(ptrdiff_t __i) {
|
||||
difference_type __n = __i + _M_offset;
|
||||
_M_p += __n / __WORD_BIT;
|
||||
__n = __n % __WORD_BIT;
|
||||
_M_p += __n / _M_word_bit;
|
||||
__n = __n % _M_word_bit;
|
||||
if (__n < 0) {
|
||||
_M_offset = (unsigned int) __n + __WORD_BIT;
|
||||
_M_offset = (unsigned int) __n + _M_word_bit;
|
||||
--_M_p;
|
||||
} else
|
||||
_M_offset = (unsigned int) __n;
|
||||
@@ -151,7 +151,7 @@ struct _Bit_iterator_base : public iterator<random_access_iterator_tag, bool>
|
||||
|
||||
inline ptrdiff_t
|
||||
operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) {
|
||||
return __WORD_BIT * (__x._M_p - __y._M_p) + __x._M_offset - __y._M_offset;
|
||||
return _M_word_bit * (__x._M_p - __y._M_p) + __x._M_offset - __y._M_offset;
|
||||
}
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ public:
|
||||
|
||||
protected:
|
||||
unsigned int* _M_bit_alloc(size_t __n)
|
||||
{ return _M_data_allocator.allocate((__n + __WORD_BIT - 1)/__WORD_BIT); }
|
||||
{ return _M_data_allocator.allocate((__n + _M_word_bit - 1)/_M_word_bit); }
|
||||
void _M_deallocate() {
|
||||
if (_M_start._M_p)
|
||||
_M_data_allocator.deallocate(_M_start._M_p,
|
||||
@@ -313,7 +313,7 @@ protected:
|
||||
_Alloc_type;
|
||||
|
||||
unsigned int* _M_bit_alloc(size_t __n)
|
||||
{ return _Alloc_type::allocate((__n + __WORD_BIT - 1)/__WORD_BIT); }
|
||||
{ return _Alloc_type::allocate((__n + _M_word_bit - 1)/_M_word_bit); }
|
||||
void _M_deallocate() {
|
||||
if (_M_start._M_p)
|
||||
_Alloc_type::deallocate(_M_start._M_p,
|
||||
@@ -380,7 +380,7 @@ template <typename _Alloc>
|
||||
protected:
|
||||
void _M_initialize(size_type __n) {
|
||||
unsigned int* __q = _M_bit_alloc(__n);
|
||||
_M_end_of_storage = __q + (__n + __WORD_BIT - 1)/__WORD_BIT;
|
||||
_M_end_of_storage = __q + (__n + _M_word_bit - 1)/_M_word_bit;
|
||||
_M_start = iterator(__q, 0);
|
||||
_M_finish = _M_start + difference_type(__n);
|
||||
}
|
||||
@@ -391,13 +391,13 @@ template <typename _Alloc>
|
||||
++_M_finish;
|
||||
}
|
||||
else {
|
||||
size_type __len = size() ? 2 * size() : __WORD_BIT;
|
||||
size_type __len = size() ? 2 * size() : _M_word_bit;
|
||||
unsigned int* __q = _M_bit_alloc(__len);
|
||||
iterator __i = copy(begin(), __position, iterator(__q, 0));
|
||||
*__i++ = __x;
|
||||
_M_finish = copy(__position, end(), __i);
|
||||
_M_deallocate();
|
||||
_M_end_of_storage = __q + (__len + __WORD_BIT - 1)/__WORD_BIT;
|
||||
_M_end_of_storage = __q + (__len + _M_word_bit - 1)/_M_word_bit;
|
||||
_M_start = iterator(__q, 0);
|
||||
}
|
||||
}
|
||||
@@ -448,7 +448,7 @@ template <typename _Alloc>
|
||||
__i = copy(__first, __last, __i);
|
||||
_M_finish = copy(__position, end(), __i);
|
||||
_M_deallocate();
|
||||
_M_end_of_storage = __q + (__len + __WORD_BIT - 1)/__WORD_BIT;
|
||||
_M_end_of_storage = __q + (__len + _M_word_bit - 1)/_M_word_bit;
|
||||
_M_start = iterator(__q, 0);
|
||||
}
|
||||
}
|
||||
@@ -614,7 +614,7 @@ template <typename _Alloc>
|
||||
_M_finish = copy(begin(), end(), iterator(__q, 0));
|
||||
_M_deallocate();
|
||||
_M_start = iterator(__q, 0);
|
||||
_M_end_of_storage = __q + (__n + __WORD_BIT - 1)/__WORD_BIT;
|
||||
_M_end_of_storage = __q + (__n + _M_word_bit - 1)/_M_word_bit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -678,7 +678,7 @@ template <typename _Alloc>
|
||||
fill_n(__i, __n, __x);
|
||||
_M_finish = copy(__position, end(), __i + difference_type(__n));
|
||||
_M_deallocate();
|
||||
_M_end_of_storage = __q + (__len + __WORD_BIT - 1)/__WORD_BIT;
|
||||
_M_end_of_storage = __q + (__len + _M_word_bit - 1)/_M_word_bit;
|
||||
_M_start = iterator(__q, 0);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -908,140 +908,52 @@ namespace std
|
||||
//
|
||||
// The primary class traits
|
||||
//
|
||||
template<typename _Tp>
|
||||
struct numeric_limits
|
||||
{
|
||||
static const bool is_specialized = false;
|
||||
struct __numeric_limits_base
|
||||
{
|
||||
static const bool is_specialized = false;
|
||||
|
||||
static const int digits = 0;
|
||||
static const int digits10 = 0;
|
||||
static const bool is_signed = false;
|
||||
static const bool is_integer = false;
|
||||
static const bool is_exact = false;
|
||||
static const int radix = 0;
|
||||
|
||||
static const int min_exponent = 0;
|
||||
static const int min_exponent10 = 0;
|
||||
static const int max_exponent = 0;
|
||||
static const int max_exponent10 = 0;
|
||||
|
||||
static const bool has_infinity = false;
|
||||
static const bool has_quiet_NaN = false;
|
||||
static const bool has_signaling_NaN = false;
|
||||
static const float_denorm_style has_denorm = denorm_absent;
|
||||
static const bool has_denorm_loss = false;
|
||||
|
||||
static const bool is_iec559 = false;
|
||||
static const bool is_bounded = false;
|
||||
static const bool is_modulo = false;
|
||||
|
||||
static const bool traps = false;
|
||||
static const bool tinyness_before = false;
|
||||
static const float_round_style round_style = round_toward_zero;
|
||||
};
|
||||
|
||||
template<typename _Tp>
|
||||
struct numeric_limits : public __numeric_limits_base
|
||||
{
|
||||
static _Tp min() throw() { return static_cast<_Tp>(0); }
|
||||
static _Tp max() throw() { return static_cast<_Tp>(0); }
|
||||
|
||||
static const int digits = 0;
|
||||
static const int digits10 = 0;
|
||||
static const bool is_signed = false;
|
||||
static const bool is_integer = false;
|
||||
static const bool is_exact = false;
|
||||
static const int radix = 0;
|
||||
|
||||
static _Tp epsilon() throw() { return static_cast<_Tp>(0); }
|
||||
static _Tp round_error() throw() { return static_cast<_Tp>(0); }
|
||||
|
||||
static const int min_exponent = 0;
|
||||
static const int min_exponent10 = 0;
|
||||
static const int max_exponent = 0;
|
||||
static const int max_exponent10 = 0;
|
||||
|
||||
static const bool has_infinity = false;
|
||||
static const bool has_quiet_NaN = false;
|
||||
static const bool has_signaling_NaN = false;
|
||||
static const float_denorm_style has_denorm = denorm_absent;
|
||||
static const bool has_denorm_loss = false;
|
||||
|
||||
static _Tp infinity() throw() { return static_cast<_Tp>(0); }
|
||||
static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); }
|
||||
static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); }
|
||||
static _Tp denorm_min() throw() { return static_cast<_Tp>(0); }
|
||||
|
||||
static const bool is_iec559 = false;
|
||||
static const bool is_bounded = false;
|
||||
static const bool is_modulo = false;
|
||||
|
||||
static const bool traps = false;
|
||||
static const bool tinyness_before = false;
|
||||
static const float_round_style round_style = round_toward_zero;
|
||||
};
|
||||
|
||||
template<typename _Tp>
|
||||
const bool
|
||||
numeric_limits<_Tp>::is_specialized;
|
||||
|
||||
template<typename _Tp>
|
||||
const int
|
||||
numeric_limits<_Tp>::digits;
|
||||
|
||||
template<typename _Tp>
|
||||
const int
|
||||
numeric_limits<_Tp>::digits10;
|
||||
|
||||
template<typename _Tp>
|
||||
const bool
|
||||
numeric_limits<_Tp>::is_signed;
|
||||
|
||||
template<typename _Tp>
|
||||
const bool
|
||||
numeric_limits<_Tp>::is_integer;
|
||||
|
||||
template<typename _Tp>
|
||||
const bool
|
||||
numeric_limits<_Tp>::is_exact;
|
||||
|
||||
template<typename _Tp>
|
||||
const int
|
||||
numeric_limits<_Tp>::radix;
|
||||
|
||||
template<typename _Tp>
|
||||
const int
|
||||
numeric_limits<_Tp>::min_exponent;
|
||||
|
||||
template<typename _Tp>
|
||||
const int
|
||||
numeric_limits<_Tp>::min_exponent10;
|
||||
|
||||
template<typename _Tp>
|
||||
const int
|
||||
numeric_limits<_Tp>::max_exponent;
|
||||
|
||||
template<typename _Tp>
|
||||
const int
|
||||
numeric_limits<_Tp>::max_exponent10;
|
||||
|
||||
template<typename _Tp>
|
||||
const bool
|
||||
numeric_limits<_Tp>::has_infinity;
|
||||
|
||||
template<typename _Tp>
|
||||
const bool
|
||||
numeric_limits<_Tp>::has_quiet_NaN;
|
||||
|
||||
template<typename _Tp>
|
||||
const bool
|
||||
numeric_limits<_Tp>::has_signaling_NaN;
|
||||
|
||||
template<typename _Tp>
|
||||
const float_denorm_style
|
||||
numeric_limits<_Tp>::has_denorm;
|
||||
|
||||
template<typename _Tp>
|
||||
const bool
|
||||
numeric_limits<_Tp>::has_denorm_loss;
|
||||
|
||||
template<typename _Tp>
|
||||
const bool
|
||||
numeric_limits<_Tp>::is_iec559;
|
||||
|
||||
template<typename _Tp>
|
||||
const bool
|
||||
numeric_limits<_Tp>::is_bounded;
|
||||
|
||||
template<typename _Tp>
|
||||
const bool
|
||||
numeric_limits<_Tp>::is_modulo;
|
||||
|
||||
template<typename _Tp>
|
||||
const bool
|
||||
numeric_limits<_Tp>::traps;
|
||||
|
||||
template<typename _Tp>
|
||||
const bool
|
||||
numeric_limits<_Tp>::tinyness_before;
|
||||
|
||||
template<typename _Tp>
|
||||
const float_round_style
|
||||
numeric_limits<_Tp>::round_style;
|
||||
|
||||
// Now there follow 15 explicit specializations. Yes, 15. Make sure
|
||||
// you get the count right.
|
||||
|
||||
// you get the count right.
|
||||
template<>
|
||||
struct numeric_limits<bool>
|
||||
{
|
||||
|
||||
@@ -362,8 +362,8 @@ test_file()
|
||||
else
|
||||
# the file did not compile/link.
|
||||
printf "\n" >> $LOG_FILE
|
||||
# `cat compile.out >> $LOG_FILE`
|
||||
# rm compile.out
|
||||
`cat compile.out >> $LOG_FILE`
|
||||
rm compile.out
|
||||
RESULT="-b"
|
||||
TEXT="0"
|
||||
DATA="0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Static data members of -*- C++ -*- numeric_limits classes
|
||||
|
||||
// Copyright (C) 1999, 2001 Free Software Foundation, Inc.
|
||||
// Copyright (C) 1999, 2001, 2002 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
|
||||
@@ -38,6 +38,29 @@
|
||||
|
||||
namespace std
|
||||
{
|
||||
const bool __numeric_limits_base::is_specialized;
|
||||
const int __numeric_limits_base::digits;
|
||||
const int __numeric_limits_base::digits10;
|
||||
const bool __numeric_limits_base::is_signed;
|
||||
const bool __numeric_limits_base::is_integer;
|
||||
const bool __numeric_limits_base::is_exact;
|
||||
const int __numeric_limits_base::radix;
|
||||
const int __numeric_limits_base::min_exponent;
|
||||
const int __numeric_limits_base::min_exponent10;
|
||||
const int __numeric_limits_base::max_exponent;
|
||||
const int __numeric_limits_base::max_exponent10;
|
||||
const bool __numeric_limits_base::has_infinity;
|
||||
const bool __numeric_limits_base::has_quiet_NaN;
|
||||
const bool __numeric_limits_base::has_signaling_NaN;
|
||||
const float_denorm_style __numeric_limits_base::has_denorm;
|
||||
const bool __numeric_limits_base::has_denorm_loss;
|
||||
const bool __numeric_limits_base::is_iec559;
|
||||
const bool __numeric_limits_base::is_bounded;
|
||||
const bool __numeric_limits_base::is_modulo;
|
||||
const bool __numeric_limits_base::traps;
|
||||
const bool __numeric_limits_base::tinyness_before;
|
||||
const float_round_style __numeric_limits_base::round_style;
|
||||
|
||||
// bool
|
||||
const bool numeric_limits<bool>::is_specialized;
|
||||
const int numeric_limits<bool>::digits;
|
||||
|
||||
@@ -43,126 +43,124 @@
|
||||
|
||||
namespace std
|
||||
{
|
||||
typedef ostreambuf_iterator<char> obuf_iterator;
|
||||
typedef istreambuf_iterator<char> ibuf_iterator;
|
||||
typedef ostreambuf_iterator<wchar_t> wobuf_iterator;
|
||||
typedef istreambuf_iterator<wchar_t> wibuf_iterator;
|
||||
|
||||
// moneypunct, money_get, and money_put
|
||||
template class moneypunct<char, false>;
|
||||
template class moneypunct<char, true>;
|
||||
template class moneypunct_byname<char, false>;
|
||||
template class moneypunct_byname<char, true>;
|
||||
template class money_get<char, ibuf_iterator>;
|
||||
template class money_put<char, obuf_iterator>;
|
||||
template class money_get<char, istreambuf_iterator<char> >;
|
||||
template class money_put<char, ostreambuf_iterator<char> >;
|
||||
|
||||
#ifdef _GLIBCPP_USE_WCHAR_T
|
||||
template class moneypunct<wchar_t, false>;
|
||||
template class moneypunct<wchar_t, true>;
|
||||
template class moneypunct_byname<wchar_t, false>;
|
||||
template class moneypunct_byname<wchar_t, true>;
|
||||
template class money_get<wchar_t, wibuf_iterator>;
|
||||
template class money_put<wchar_t, wobuf_iterator>;
|
||||
template class money_get<wchar_t, istreambuf_iterator<wchar_t> >;
|
||||
template class money_put<wchar_t, ostreambuf_iterator<wchar_t> >;
|
||||
#endif
|
||||
|
||||
// numpunct, numpunct_byname, num_get, and num_put
|
||||
template class numpunct<char>;
|
||||
template class numpunct_byname<char>;
|
||||
template class num_get<char, ibuf_iterator>;
|
||||
template class num_put<char, obuf_iterator>;
|
||||
template class num_get<char, istreambuf_iterator<char> >;
|
||||
template class num_put<char, ostreambuf_iterator<char> >;
|
||||
template
|
||||
obuf_iterator
|
||||
num_put<char, obuf_iterator>::
|
||||
_M_convert_int(obuf_iterator, ios_base&, char, char, char, long) const;
|
||||
ostreambuf_iterator<char>
|
||||
num_put<char, ostreambuf_iterator<char> >::
|
||||
_M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
|
||||
long) const;
|
||||
|
||||
template
|
||||
obuf_iterator
|
||||
num_put<char, obuf_iterator>::
|
||||
_M_convert_int(obuf_iterator, ios_base&, char, char, char,
|
||||
ostreambuf_iterator<char>
|
||||
num_put<char, ostreambuf_iterator<char> >::
|
||||
_M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
|
||||
unsigned long) const;
|
||||
|
||||
#ifdef _GLIBCPP_USE_LONG_LONG
|
||||
template
|
||||
obuf_iterator
|
||||
num_put<char, obuf_iterator>::
|
||||
_M_convert_int(obuf_iterator, ios_base&, char, char, char,
|
||||
ostreambuf_iterator<char>
|
||||
num_put<char, ostreambuf_iterator<char> >::
|
||||
_M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
|
||||
long long) const;
|
||||
|
||||
template
|
||||
obuf_iterator
|
||||
num_put<char, obuf_iterator>::
|
||||
_M_convert_int(obuf_iterator, ios_base&, char, char, char,
|
||||
ostreambuf_iterator<char>
|
||||
num_put<char, ostreambuf_iterator<char> >::
|
||||
_M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
|
||||
unsigned long long) const;
|
||||
#endif
|
||||
|
||||
template
|
||||
obuf_iterator
|
||||
num_put<char, obuf_iterator>::
|
||||
_M_convert_float(obuf_iterator, ios_base&, char, char, double) const;
|
||||
ostreambuf_iterator<char>
|
||||
num_put<char, ostreambuf_iterator<char> >::
|
||||
_M_convert_float(ostreambuf_iterator<char>, ios_base&, char, char,
|
||||
double) const;
|
||||
|
||||
template
|
||||
obuf_iterator
|
||||
num_put<char, obuf_iterator>::
|
||||
_M_convert_float(obuf_iterator, ios_base&, char, char,
|
||||
ostreambuf_iterator<char>
|
||||
num_put<char, ostreambuf_iterator<char> >::
|
||||
_M_convert_float(ostreambuf_iterator<char>, ios_base&, char, char,
|
||||
long double) const;
|
||||
|
||||
#ifdef _GLIBCPP_USE_WCHAR_T
|
||||
template class numpunct<wchar_t>;
|
||||
template class numpunct_byname<wchar_t>;
|
||||
template class num_get<wchar_t, wibuf_iterator>;
|
||||
template class num_put<wchar_t, wobuf_iterator>;
|
||||
template class num_get<wchar_t, istreambuf_iterator<wchar_t> >;
|
||||
template class num_put<wchar_t, ostreambuf_iterator<wchar_t> >;
|
||||
|
||||
template
|
||||
wobuf_iterator
|
||||
num_put<wchar_t, wobuf_iterator>::
|
||||
_M_convert_int(wobuf_iterator, ios_base&, wchar_t, char, char, long) const;
|
||||
ostreambuf_iterator<wchar_t>
|
||||
num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
|
||||
_M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
|
||||
char, long) const;
|
||||
|
||||
template
|
||||
wobuf_iterator
|
||||
num_put<wchar_t, wobuf_iterator>::
|
||||
_M_convert_int(wobuf_iterator, ios_base&, wchar_t, char, char,
|
||||
unsigned long) const;
|
||||
ostreambuf_iterator<wchar_t>
|
||||
num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
|
||||
_M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
|
||||
char, unsigned long) const;
|
||||
|
||||
#ifdef _GLIBCPP_USE_LONG_LONG
|
||||
template
|
||||
wobuf_iterator
|
||||
num_put<wchar_t, wobuf_iterator>::
|
||||
_M_convert_int(wobuf_iterator, ios_base&, wchar_t, char, char,
|
||||
long long) const;
|
||||
ostreambuf_iterator<wchar_t>
|
||||
num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
|
||||
_M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
|
||||
char, long long) const;
|
||||
|
||||
template
|
||||
wobuf_iterator
|
||||
num_put<wchar_t, wobuf_iterator>::
|
||||
_M_convert_int(wobuf_iterator, ios_base&, wchar_t, char, char,
|
||||
unsigned long long) const;
|
||||
ostreambuf_iterator<wchar_t>
|
||||
num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
|
||||
_M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
|
||||
char, unsigned long long) const;
|
||||
#endif
|
||||
|
||||
template
|
||||
wobuf_iterator
|
||||
num_put<wchar_t, wobuf_iterator>::
|
||||
_M_convert_float(wobuf_iterator, ios_base&, wchar_t, char,
|
||||
ostreambuf_iterator<wchar_t>
|
||||
num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
|
||||
_M_convert_float(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
|
||||
double) const;
|
||||
|
||||
template
|
||||
wobuf_iterator
|
||||
num_put<wchar_t, wobuf_iterator>::
|
||||
_M_convert_float(wobuf_iterator, ios_base&, wchar_t, char,
|
||||
ostreambuf_iterator<wchar_t>
|
||||
num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
|
||||
_M_convert_float(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
|
||||
long double) const;
|
||||
#endif
|
||||
|
||||
// time_get and time_put
|
||||
template class __timepunct<char>;
|
||||
template class time_put<char, obuf_iterator>;
|
||||
template class time_put_byname<char, obuf_iterator>;
|
||||
template class time_get<char, ibuf_iterator>;
|
||||
template class time_get_byname<char, ibuf_iterator>;
|
||||
template class time_put<char, ostreambuf_iterator<char> >;
|
||||
template class time_put_byname<char, ostreambuf_iterator<char> >;
|
||||
template class time_get<char, istreambuf_iterator<char> >;
|
||||
template class time_get_byname<char, istreambuf_iterator<char> >;
|
||||
|
||||
#ifdef _GLIBCPP_USE_WCHAR_T
|
||||
template class __timepunct<wchar_t>;
|
||||
template class time_put<wchar_t, wobuf_iterator>;
|
||||
template class time_put_byname<wchar_t, wobuf_iterator>;
|
||||
template class time_get<wchar_t, wibuf_iterator>;
|
||||
template class time_get_byname<wchar_t, wibuf_iterator>;
|
||||
template class time_put<wchar_t, ostreambuf_iterator<wchar_t> >;
|
||||
template class time_put_byname<wchar_t, ostreambuf_iterator<wchar_t> >;
|
||||
template class time_get<wchar_t, istreambuf_iterator<wchar_t> >;
|
||||
template class time_get_byname<wchar_t, istreambuf_iterator<wchar_t> >;
|
||||
#endif
|
||||
|
||||
// messages
|
||||
@@ -198,18 +196,7 @@ namespace std
|
||||
#endif
|
||||
|
||||
// use_facet
|
||||
template
|
||||
const numpunct<char>&
|
||||
use_facet<numpunct<char> >(const locale&);
|
||||
|
||||
template
|
||||
const num_put<char, obuf_iterator >&
|
||||
use_facet<num_put<char, obuf_iterator> >(const locale&);
|
||||
|
||||
template
|
||||
const num_get<char, ibuf_iterator >&
|
||||
use_facet<num_get<char, ibuf_iterator> >(const locale&);
|
||||
|
||||
// NB: use_facet<ctype> is specialized
|
||||
template
|
||||
const codecvt<char, char, mbstate_t>&
|
||||
use_facet<codecvt<char, char, mbstate_t> >(const locale&);
|
||||
@@ -218,6 +205,18 @@ namespace std
|
||||
const collate<char>&
|
||||
use_facet<collate<char> >(const locale&);
|
||||
|
||||
template
|
||||
const numpunct<char>&
|
||||
use_facet<numpunct<char> >(const locale&);
|
||||
|
||||
template
|
||||
const num_put<char>&
|
||||
use_facet<num_put<char> >(const locale&);
|
||||
|
||||
template
|
||||
const num_get<char>&
|
||||
use_facet<num_get<char> >(const locale&);
|
||||
|
||||
template
|
||||
const moneypunct<char, true>&
|
||||
use_facet<moneypunct<char, true> >(const locale&);
|
||||
@@ -226,23 +225,31 @@ namespace std
|
||||
const moneypunct<char, false>&
|
||||
use_facet<moneypunct<char, false> >(const locale&);
|
||||
|
||||
template
|
||||
const money_put<char>&
|
||||
use_facet<money_put<char> >(const locale&);
|
||||
|
||||
template
|
||||
const money_get<char>&
|
||||
use_facet<money_get<char> >(const locale&);
|
||||
|
||||
template
|
||||
const __timepunct<char>&
|
||||
use_facet<__timepunct<char> >(const locale&);
|
||||
|
||||
template
|
||||
const time_put<char>&
|
||||
use_facet<time_put<char> >(const locale&);
|
||||
|
||||
template
|
||||
const time_get<char>&
|
||||
use_facet<time_get<char> >(const locale&);
|
||||
|
||||
template
|
||||
const messages<char>&
|
||||
use_facet<messages<char> >(const locale&);
|
||||
|
||||
#ifdef _GLIBCPP_USE_WCHAR_T
|
||||
template
|
||||
const numpunct<wchar_t>&
|
||||
use_facet<numpunct<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
const num_put<wchar_t, wobuf_iterator>&
|
||||
use_facet<num_put<wchar_t, wobuf_iterator> >(const locale&);
|
||||
|
||||
template
|
||||
const num_get<wchar_t, wibuf_iterator>&
|
||||
use_facet<num_get<wchar_t, wibuf_iterator> >(const locale&);
|
||||
|
||||
template
|
||||
const codecvt<wchar_t, char, mbstate_t>&
|
||||
use_facet<codecvt<wchar_t, char, mbstate_t> >(locale const&);
|
||||
@@ -251,6 +258,18 @@ namespace std
|
||||
const collate<wchar_t>&
|
||||
use_facet<collate<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
const numpunct<wchar_t>&
|
||||
use_facet<numpunct<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
const num_put<wchar_t>&
|
||||
use_facet<num_put<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
const num_get<wchar_t>&
|
||||
use_facet<num_get<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
const moneypunct<wchar_t, true>&
|
||||
use_facet<moneypunct<wchar_t, true> >(const locale&);
|
||||
@@ -258,72 +277,147 @@ namespace std
|
||||
template
|
||||
const moneypunct<wchar_t, false>&
|
||||
use_facet<moneypunct<wchar_t, false> >(const locale&);
|
||||
|
||||
template
|
||||
const money_put<wchar_t>&
|
||||
use_facet<money_put<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
const money_get<wchar_t>&
|
||||
use_facet<money_get<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
const __timepunct<wchar_t>&
|
||||
use_facet<__timepunct<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
const time_put<wchar_t>&
|
||||
use_facet<time_put<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
const time_get<wchar_t>&
|
||||
use_facet<time_get<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
const messages<wchar_t>&
|
||||
use_facet<messages<wchar_t> >(const locale&);
|
||||
#endif
|
||||
|
||||
// has_facet
|
||||
template
|
||||
bool
|
||||
has_facet<ctype<char> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<codecvt<char, char, mbstate_t> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<collate<char> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<numpunct<char> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<num_put<char> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<num_get<char> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<ctype<char> >(const locale&);
|
||||
has_facet<moneypunct<char> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<money_put<char> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<money_get<char> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<__timepunct<char> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<time_put<char> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<time_get<char> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<messages<char> >(const locale&);
|
||||
|
||||
#ifdef _GLIBCPP_USE_WCHAR_T
|
||||
template
|
||||
bool
|
||||
has_facet<ctype<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<codecvt<wchar_t, char, mbstate_t> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<collate<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<numpunct<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<num_put<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<num_get<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<ctype<wchar_t> >(const locale&);
|
||||
has_facet<moneypunct<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<money_put<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<money_get<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<__timepunct<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<time_put<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<time_get<wchar_t> >(const locale&);
|
||||
|
||||
template
|
||||
bool
|
||||
has_facet<messages<wchar_t> >(const locale&);
|
||||
#endif
|
||||
|
||||
//
|
||||
// iterator
|
||||
//
|
||||
typedef vector<locale::facet*> vec_pfacet;
|
||||
template
|
||||
void
|
||||
vec_pfacet::
|
||||
insert(vec_pfacet::iterator, vec_pfacet::size_type,
|
||||
const vec_pfacet::value_type&);
|
||||
template
|
||||
void
|
||||
vec_pfacet::
|
||||
_M_fill_insert(vec_pfacet::iterator, vec_pfacet::size_type,
|
||||
const vec_pfacet::value_type&);
|
||||
template class vector<locale::facet*>;
|
||||
template class __normal_iterator<locale::facet**, vector<locale::facet*> >;
|
||||
template class __normal_iterator<locale::facet* const*,
|
||||
vector<locale::facet*> >;
|
||||
|
||||
|
||||
//
|
||||
// locale
|
||||
//
|
||||
typedef istreambuf_iterator<char, char_traits<char> > istreambuf_iter;
|
||||
typedef ostreambuf_iterator<char, char_traits<char> > ostreambuf_iter;
|
||||
|
||||
#ifdef _GLIBCPP_USE_WCHAR_T
|
||||
typedef istreambuf_iterator<wchar_t, char_traits<wchar_t> > wistreambuf_iter;
|
||||
typedef ostreambuf_iterator<wchar_t, char_traits<wchar_t> > wostreambuf_iter;
|
||||
#endif
|
||||
|
||||
template
|
||||
bool
|
||||
locale::operator()(const string&, const string&) const;
|
||||
|
||||
template
|
||||
char*
|
||||
__add_grouping<char>(char*, char, char const*, char const*,
|
||||
@@ -344,12 +438,6 @@ namespace std
|
||||
streamsize, streamsize, const bool);
|
||||
|
||||
#ifdef _GLIBCPP_USE_WCHAR_T
|
||||
template
|
||||
bool
|
||||
locale::operator()(const wstring&, const wstring&) const;
|
||||
|
||||
typedef ostreambuf_iterator<wchar_t> wostreambuf_iter;
|
||||
|
||||
template
|
||||
wchar_t*
|
||||
__add_grouping<wchar_t>(wchar_t*, wchar_t, char const*, char const*,
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace std
|
||||
const size_t locale::_S_num_categories;
|
||||
const size_t locale::_S_num_facets;
|
||||
|
||||
// Definitions for locale::id of standard facets.
|
||||
// Definitions for locale::id of standard facets that are specialized.
|
||||
locale::id ctype<char>::id;
|
||||
locale::id codecvt<char, char, mbstate_t>::id;
|
||||
|
||||
|
||||
@@ -34,16 +34,11 @@
|
||||
#include <bits/c++config.h>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <ostream>
|
||||
#include <map>
|
||||
|
||||
namespace std
|
||||
{
|
||||
const int __stl_threshold = 16;
|
||||
const int __stl_chunk_size = 7;
|
||||
const int __WORD_BIT = int(CHAR_BIT*sizeof(unsigned int));
|
||||
const _Rb_tree_Color_type _S_rb_tree_red = false;
|
||||
const _Rb_tree_Color_type _S_rb_tree_black = true;
|
||||
template class allocator<char>;
|
||||
template class allocator<wchar_t>;
|
||||
|
||||
template class __malloc_alloc_template<0>;
|
||||
|
||||
@@ -55,5 +50,4 @@ namespace std
|
||||
void
|
||||
vector<unsigned int>::
|
||||
_M_insert_aux(vector<unsigned int>::iterator, unsigned int const &);
|
||||
|
||||
} // namespace std
|
||||
|
||||
@@ -55,6 +55,7 @@ DEFINE_EXTREMA(long double, LDBL_MIN, LDBL_MAX);
|
||||
template<typename T>
|
||||
void test_extrema()
|
||||
{
|
||||
bool test = true;
|
||||
VERIFY( extrema<T>::min == std::numeric_limits<T>::min() );
|
||||
VERIFY( extrema<T>::max == std::numeric_limits<T>::max() );
|
||||
}
|
||||
@@ -73,6 +74,7 @@ template<>
|
||||
void test_extrema<long double>()
|
||||
{
|
||||
typedef long double T;
|
||||
bool test = true;
|
||||
VERIFY( (extrema<T>::min - std::numeric_limits<T>::min())
|
||||
< std::numeric_limits<T>::epsilon() );
|
||||
VERIFY( (std::numeric_limits<T>::min() - extrema<T>::min)
|
||||
@@ -92,6 +94,7 @@ void test_extrema<long double>()
|
||||
|
||||
void test_sign()
|
||||
{
|
||||
bool test = true;
|
||||
VERIFY( std::numeric_limits<char>::is_signed == char_is_signed );
|
||||
VERIFY( std::numeric_limits<signed char>::is_signed == true );
|
||||
VERIFY( std::numeric_limits<unsigned char>::is_signed == false );
|
||||
@@ -230,9 +233,3 @@ int main()
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// 2000-09-11 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
// Copyright (C) 2000, 2001 Free Software Foundation
|
||||
// Copyright (C) 2000, 2001, 2002 Free Software Foundation
|
||||
//
|
||||
// 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
|
||||
@@ -47,9 +47,9 @@ void test01()
|
||||
}
|
||||
|
||||
// bool operator()(const string_type&, const string_type&) const
|
||||
typedef std::collate<char> ccollate;
|
||||
long gnu_count;
|
||||
class gnu_collate: public ccollate
|
||||
|
||||
class gnu_collate: public std::collate<char>
|
||||
{
|
||||
protected:
|
||||
virtual int
|
||||
@@ -79,7 +79,7 @@ void test02()
|
||||
int main ()
|
||||
{
|
||||
test01();
|
||||
|
||||
test02();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user