mirror of
https://gcc.gnu.org/git/gcc.git
synced 2025-01-21 20:04:02 +08:00
stl_alloc.h: Cleanups.
2003-06-06 Benjamin Kosnik <bkoz@redhat.com> * include/bits/stl_alloc.h: Cleanups. * include/ext/functional: Same. * include/ext/hash_map: Same. * include/ext/hash_set: Same. * include/ext/iterator: Same. * include/ext/memory: Same. * include/ext/numeric: Same. * include/ext/rb_tree: Same. * include/ext/ropeimpl.h: Same. * include/ext/slist: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/stdio_sync_filebuf.h: Same. * include/ext/stl_rope.h: Move to... * include/ext/rope: ...here. * include/ext/stl_hash_fun.h: Move to... * include/ext/hash_fun.h: ...here. * include/ext/stl_hashtable.h: Move to... * include/ext/hashtable.h: ...here. * include/backward/hashtable.h: Reflect new names. * include/Makefile.am: Same. * include/Makefile.in: Regenerated. From-SVN: r67551
This commit is contained in:
parent
744f6f0984
commit
b2acb86f5b
@ -1,3 +1,27 @@
|
||||
2003-06-06 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* include/bits/stl_alloc.h: Cleanups.
|
||||
* include/ext/functional: Same.
|
||||
* include/ext/hash_map: Same.
|
||||
* include/ext/hash_set: Same.
|
||||
* include/ext/iterator: Same.
|
||||
* include/ext/memory: Same.
|
||||
* include/ext/numeric: Same.
|
||||
* include/ext/rb_tree: Same.
|
||||
* include/ext/ropeimpl.h: Same.
|
||||
* include/ext/slist: Same.
|
||||
* include/ext/stdio_filebuf.h: Same.
|
||||
* include/ext/stdio_sync_filebuf.h: Same.
|
||||
* include/ext/stl_rope.h: Move to...
|
||||
* include/ext/rope: ...here.
|
||||
* include/ext/stl_hash_fun.h: Move to...
|
||||
* include/ext/hash_fun.h: ...here.
|
||||
* include/ext/stl_hashtable.h: Move to...
|
||||
* include/ext/hashtable.h: ...here.
|
||||
* include/backward/hashtable.h: Reflect new names.
|
||||
* include/Makefile.am: Same.
|
||||
* include/Makefile.in: Regenerated.
|
||||
|
||||
2003-06-05 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
PR libstdc++/9024
|
||||
|
@ -228,9 +228,9 @@ ext_headers = \
|
||||
${ext_srcdir}/rope \
|
||||
${ext_srcdir}/ropeimpl.h \
|
||||
${ext_srcdir}/slist \
|
||||
${ext_srcdir}/stl_hash_fun.h \
|
||||
${ext_srcdir}/stl_hashtable.h \
|
||||
${ext_srcdir}/stl_rope.h
|
||||
${ext_srcdir}/hash_fun.h \
|
||||
${ext_srcdir}/hashtable.h
|
||||
|
||||
|
||||
# This is the common subset of files that all three "C" header models use.
|
||||
c_base_srcdir = @C_INCLUDE_DIR@
|
||||
|
@ -126,6 +126,7 @@ enable_shared = @enable_shared@
|
||||
enable_static = @enable_static@
|
||||
glibcpp_CXX = @glibcpp_CXX@
|
||||
glibcpp_MOFILES = @glibcpp_MOFILES@
|
||||
glibcpp_PCHFLAGS = @glibcpp_PCHFLAGS@
|
||||
glibcpp_POFILES = @glibcpp_POFILES@
|
||||
glibcpp_basedir = @glibcpp_basedir@
|
||||
glibcpp_localedir = @glibcpp_localedir@
|
||||
@ -348,9 +349,8 @@ ext_headers = \
|
||||
${ext_srcdir}/rope \
|
||||
${ext_srcdir}/ropeimpl.h \
|
||||
${ext_srcdir}/slist \
|
||||
${ext_srcdir}/stl_hash_fun.h \
|
||||
${ext_srcdir}/stl_hashtable.h \
|
||||
${ext_srcdir}/stl_rope.h
|
||||
${ext_srcdir}/hash_fun.h \
|
||||
${ext_srcdir}/hashtable.h
|
||||
|
||||
|
||||
# This is the common subset of files that all three "C" header models use.
|
||||
|
@ -61,7 +61,7 @@
|
||||
#define _CPP_BACKWARD_HASHTABLE_H 1
|
||||
|
||||
#include "backward_warning.h"
|
||||
#include <ext/stl_hashtable.h>
|
||||
#include <ext/hashtable.h>
|
||||
#include "algo.h"
|
||||
#include "alloc.h"
|
||||
#include "vector.h"
|
||||
|
@ -83,7 +83,6 @@
|
||||
#include <cstring>
|
||||
#include <bits/functexcept.h> // For __throw_bad_alloc
|
||||
#include <bits/stl_threads.h>
|
||||
|
||||
#include <bits/atomicity.h>
|
||||
|
||||
namespace std
|
||||
@ -172,8 +171,6 @@ namespace std
|
||||
}
|
||||
}
|
||||
|
||||
// Should not be referenced within the library anymore.
|
||||
typedef __new_alloc __mem_interface;
|
||||
|
||||
/**
|
||||
* @if maint
|
||||
|
@ -60,9 +60,10 @@
|
||||
*/
|
||||
|
||||
#ifndef _EXT_FUNCTIONAL
|
||||
#define _EXT_FUNCTIONAL
|
||||
#define _EXT_FUNCTIONAL 1
|
||||
|
||||
#pragma GCC system_header
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace __gnu_cxx
|
||||
@ -388,8 +389,7 @@ template <class _Ret, class _Tp, class _Arg>
|
||||
inline const_mem_fun1_ref_t<_Ret,_Tp,_Arg>
|
||||
mem_fun1_ref(_Ret (_Tp::*__f)(_Arg) const)
|
||||
{ return const_mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); }
|
||||
|
||||
} // namespace __gnu_cxx
|
||||
|
||||
#endif /* _EXT_FUNCTIONAL */
|
||||
#endif
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 'struct hash' from SGI -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2002, 2003 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
|
||||
@ -53,74 +53,70 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/** @file ext/stl_hash_fun.h
|
||||
/** @file ext/hash_fun.h
|
||||
* This file is a GNU extension to the Standard C++ Library (possibly
|
||||
* containing extensions from the HP/SGI STL subset). You should only
|
||||
* include this header if you are using GCC 3 or later.
|
||||
*/
|
||||
|
||||
#ifndef _CPP_BITS_STL_HASH_FUN_H
|
||||
#define _CPP_BITS_STL_HASH_FUN_H 1
|
||||
#ifndef _HASH_FUN_H
|
||||
#define _HASH_FUN_H 1
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
using std::size_t;
|
||||
using std::size_t;
|
||||
|
||||
template <class _Key> struct hash { };
|
||||
template <class _Key> struct hash { };
|
||||
|
||||
inline size_t __stl_hash_string(const char* __s)
|
||||
{
|
||||
unsigned long __h = 0;
|
||||
for ( ; *__s; ++__s)
|
||||
__h = 5*__h + *__s;
|
||||
inline size_t
|
||||
__stl_hash_string(const char* __s)
|
||||
{
|
||||
unsigned long __h = 0;
|
||||
for ( ; *__s; ++__s)
|
||||
__h = 5*__h + *__s;
|
||||
return size_t(__h);
|
||||
}
|
||||
|
||||
template<> struct hash<char*>
|
||||
{
|
||||
size_t operator()(const char* __s) const
|
||||
{ return __stl_hash_string(__s); }
|
||||
};
|
||||
|
||||
return size_t(__h);
|
||||
}
|
||||
template<> struct hash<const char*>
|
||||
{
|
||||
size_t operator()(const char* __s) const
|
||||
{ return __stl_hash_string(__s); }
|
||||
};
|
||||
|
||||
template<> struct hash<char*>
|
||||
{
|
||||
size_t operator()(const char* __s) const { return __stl_hash_string(__s); }
|
||||
};
|
||||
template<> struct hash<char>
|
||||
{ size_t operator()(char __x) const { return __x; } };
|
||||
|
||||
template<> struct hash<const char*>
|
||||
{
|
||||
size_t operator()(const char* __s) const { return __stl_hash_string(__s); }
|
||||
};
|
||||
template<> struct hash<unsigned char>
|
||||
{ size_t operator()(unsigned char __x) const { return __x; } };
|
||||
|
||||
template<> struct hash<char> {
|
||||
size_t operator()(char __x) const { return __x; }
|
||||
};
|
||||
template<> struct hash<unsigned char> {
|
||||
size_t operator()(unsigned char __x) const { return __x; }
|
||||
};
|
||||
template<> struct hash<signed char> {
|
||||
size_t operator()(unsigned char __x) const { return __x; }
|
||||
};
|
||||
template<> struct hash<short> {
|
||||
size_t operator()(short __x) const { return __x; }
|
||||
};
|
||||
template<> struct hash<unsigned short> {
|
||||
size_t operator()(unsigned short __x) const { return __x; }
|
||||
};
|
||||
template<> struct hash<int> {
|
||||
size_t operator()(int __x) const { return __x; }
|
||||
};
|
||||
template<> struct hash<unsigned int> {
|
||||
size_t operator()(unsigned int __x) const { return __x; }
|
||||
};
|
||||
template<> struct hash<long> {
|
||||
size_t operator()(long __x) const { return __x; }
|
||||
};
|
||||
template<> struct hash<unsigned long> {
|
||||
size_t operator()(unsigned long __x) const { return __x; }
|
||||
};
|
||||
template<> struct hash<signed char>
|
||||
{ size_t operator()(unsigned char __x) const { return __x; } };
|
||||
|
||||
template<> struct hash<short>
|
||||
{ size_t operator()(short __x) const { return __x; } };
|
||||
|
||||
template<> struct hash<unsigned short>
|
||||
{ size_t operator()(unsigned short __x) const { return __x; } };
|
||||
|
||||
template<> struct hash<int>
|
||||
{ size_t operator()(int __x) const { return __x; } };
|
||||
|
||||
template<> struct hash<unsigned int>
|
||||
{ size_t operator()(unsigned int __x) const { return __x; } };
|
||||
|
||||
template<> struct hash<long>
|
||||
{ size_t operator()(long __x) const { return __x; } };
|
||||
|
||||
template<> struct hash<unsigned long>
|
||||
{ size_t operator()(unsigned long __x) const { return __x; } };
|
||||
} // namespace __gnu_cxx
|
||||
|
||||
#endif /* _CPP_BITS_STL_HASH_FUN_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
||||
#endif
|
@ -59,30 +59,28 @@
|
||||
* include this header if you are using GCC 3 or later.
|
||||
*/
|
||||
|
||||
#ifndef __SGI_STL_INTERNAL_HASH_MAP_H
|
||||
#define __SGI_STL_INTERNAL_HASH_MAP_H
|
||||
#ifndef _HASH_MAP
|
||||
#define _HASH_MAP 1
|
||||
|
||||
#include <ext/stl_hashtable.h>
|
||||
#include <ext/hashtable.h>
|
||||
#include <bits/concept_check.h>
|
||||
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
using std::equal_to;
|
||||
using std::allocator;
|
||||
using std::pair;
|
||||
using std::_Select1st;
|
||||
using std::equal_to;
|
||||
using std::allocator;
|
||||
using std::pair;
|
||||
using std::_Select1st;
|
||||
|
||||
// Forward declaration of equality operator; needed for friend declaration.
|
||||
// Forward declaration of equality operator; needed for friend
|
||||
// declaration.
|
||||
template<class _Key, class _Tp, class _HashFcn = hash<_Key>,
|
||||
class _EqualKey = equal_to<_Key>, class _Alloc = allocator<_Tp> >
|
||||
class hash_map;
|
||||
|
||||
template <class _Key, class _Tp,
|
||||
class _HashFcn = hash<_Key>,
|
||||
class _EqualKey = equal_to<_Key>,
|
||||
class _Alloc = allocator<_Tp> >
|
||||
class hash_map;
|
||||
|
||||
template <class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
|
||||
inline bool operator==(const hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>&,
|
||||
const hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>&);
|
||||
template<class _Key, class _Tp, class _HashFn, class _EqKey, class _Alloc>
|
||||
inline bool operator==(const hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>&,
|
||||
const hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>&);
|
||||
/**
|
||||
* This is an SGI extension.
|
||||
* @ingroup SGIextensions
|
||||
@ -444,11 +442,6 @@ public:
|
||||
insert_iterator<_Container>& operator++() { return *this; }
|
||||
insert_iterator<_Container>& operator++(int) { return *this; }
|
||||
};
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif /* __SGI_STL_INTERNAL_HASH_MAP_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
||||
#endif
|
||||
|
@ -59,31 +59,30 @@
|
||||
* include this header if you are using GCC 3 or later.
|
||||
*/
|
||||
|
||||
#ifndef __SGI_STL_INTERNAL_HASH_SET_H
|
||||
#define __SGI_STL_INTERNAL_HASH_SET_H
|
||||
#ifndef _HASH_SET
|
||||
#define _HASH_SET 1
|
||||
|
||||
#include <ext/stl_hashtable.h>
|
||||
#include <ext/hashtable.h>
|
||||
#include <bits/concept_check.h>
|
||||
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
using std::equal_to;
|
||||
using std::allocator;
|
||||
using std::pair;
|
||||
using std::_Identity;
|
||||
using std::equal_to;
|
||||
using std::allocator;
|
||||
using std::pair;
|
||||
using std::_Identity;
|
||||
|
||||
// Forward declaration of equality operator; needed for friend declaration.
|
||||
// Forward declaration of equality operator; needed for friend
|
||||
// declaration.
|
||||
template <class _Value, class _HashFcn = hash<_Value>,
|
||||
class _EqualKey = equal_to<_Value>,
|
||||
class _Alloc = allocator<_Value> >
|
||||
class hash_set;
|
||||
|
||||
template <class _Value,
|
||||
class _HashFcn = hash<_Value>,
|
||||
class _EqualKey = equal_to<_Value>,
|
||||
class _Alloc = allocator<_Value> >
|
||||
class hash_set;
|
||||
|
||||
template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
|
||||
inline bool
|
||||
operator==(const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs1,
|
||||
const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs2);
|
||||
template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
|
||||
inline bool
|
||||
operator==(const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs1,
|
||||
const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs2);
|
||||
|
||||
/**
|
||||
* This is an SGI extension.
|
||||
@ -435,11 +434,6 @@ public:
|
||||
insert_iterator<_Container>& operator++() { return *this; }
|
||||
insert_iterator<_Container>& operator++(int) { return *this; }
|
||||
};
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif /* __SGI_STL_INTERNAL_HASH_SET_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
||||
#endif
|
||||
|
@ -53,14 +53,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/** @file ext/stl_hashtable.h
|
||||
/** @file ext/hashtable.h
|
||||
* This file is a GNU extension to the Standard C++ Library (possibly
|
||||
* containing extensions from the HP/SGI STL subset). You should only
|
||||
* include this header if you are using GCC 3 or later.
|
||||
*/
|
||||
|
||||
#ifndef __SGI_STL_INTERNAL_HASHTABLE_H
|
||||
#define __SGI_STL_INTERNAL_HASHTABLE_H
|
||||
#ifndef _HASHTABLE_H
|
||||
#define _HASHTABLE_H 1
|
||||
|
||||
// Hashtable class, used to implement the hashed associative containers
|
||||
// hash_set, hash_map, hash_multiset, and hash_multimap.
|
||||
@ -69,7 +69,7 @@
|
||||
#include <iterator>
|
||||
#include <bits/stl_algo.h>
|
||||
#include <bits/stl_function.h>
|
||||
#include <ext/stl_hash_fun.h>
|
||||
#include <ext/hash_fun.h>
|
||||
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
@ -210,13 +210,14 @@ bool operator==(const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht1,
|
||||
const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht2);
|
||||
|
||||
|
||||
// Hashtables handle allocators a bit differently than other containers
|
||||
// do. If we're using standard-conforming allocators, then a hashtable
|
||||
// unconditionally has a member variable to hold its allocator, even if
|
||||
// it so happens that all instances of the allocator type are identical.
|
||||
// This is because, for hashtables, this extra storage is negligible.
|
||||
// Additionally, a base class wouldn't serve any other purposes; it
|
||||
// wouldn't, for example, simplify the exception-handling code.
|
||||
// Hashtables handle allocators a bit differently than other
|
||||
// containers do. If we're using standard-conforming allocators, then
|
||||
// a hashtable unconditionally has a member variable to hold its
|
||||
// allocator, even if it so happens that all instances of the
|
||||
// allocator type are identical. This is because, for hashtables,
|
||||
// this extra storage is negligible. Additionally, a base class
|
||||
// wouldn't serve any other purposes; it wouldn't, for example,
|
||||
// simplify the exception-handling code.
|
||||
|
||||
template <class _Val, class _Key, class _HashFcn,
|
||||
class _ExtractKey, class _EqualKey, class _Alloc>
|
||||
@ -986,11 +987,6 @@ void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
|
||||
__throw_exception_again;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace __gnu_cxx
|
||||
|
||||
#endif /* __SGI_STL_INTERNAL_HASHTABLE_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
||||
#endif
|
@ -60,19 +60,20 @@
|
||||
*/
|
||||
|
||||
#ifndef _EXT_ITERATOR
|
||||
#define _EXT_ITERATOR
|
||||
#define _EXT_ITERATOR 1
|
||||
|
||||
#pragma GCC system_header
|
||||
|
||||
#include <bits/concept_check.h>
|
||||
#include <iterator>
|
||||
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
|
||||
// There are two signatures for distance. In addition to the one taking
|
||||
// two iterators and returning a result, there is another taking two
|
||||
// iterators and a reference-to-result variable, and returning nothing.
|
||||
// The latter seems to be an SGI extension. -- pedwards
|
||||
// There are two signatures for distance. In addition to the one
|
||||
// taking two iterators and returning a result, there is another
|
||||
// taking two iterators and a reference-to-result variable, and
|
||||
// returning nothing. The latter seems to be an SGI extension.
|
||||
// -- pedwards
|
||||
template<typename _InputIterator, typename _Distance>
|
||||
inline void
|
||||
__distance(_InputIterator __first, _InputIterator __last,
|
||||
@ -106,8 +107,7 @@ namespace __gnu_cxx
|
||||
// concept requirements -- taken care of in __distance
|
||||
__distance(__first, __last, __n, std::__iterator_category(__first));
|
||||
}
|
||||
|
||||
} // namespace __gnu_cxx
|
||||
|
||||
#endif /* _EXT_ITERATOR */
|
||||
#endif
|
||||
|
||||
|
@ -60,9 +60,10 @@
|
||||
*/
|
||||
|
||||
#ifndef _EXT_MEMORY
|
||||
#define _EXT_MEMORY
|
||||
#define _EXT_MEMORY 1
|
||||
|
||||
#pragma GCC system_header
|
||||
|
||||
#include <memory>
|
||||
#include <bits/stl_tempbuf.h>
|
||||
|
||||
@ -73,30 +74,29 @@ namespace __gnu_cxx
|
||||
using std::__iterator_category;
|
||||
using std::_Temporary_buffer;
|
||||
|
||||
|
||||
template<typename _InputIter, typename _Size, typename _ForwardIter>
|
||||
pair<_InputIter, _ForwardIter>
|
||||
__uninitialized_copy_n(_InputIter __first, _Size __count,
|
||||
_ForwardIter __result,
|
||||
std::input_iterator_tag)
|
||||
_ForwardIter __result, std::input_iterator_tag)
|
||||
{
|
||||
_ForwardIter __cur = __result;
|
||||
try {
|
||||
for ( ; __count > 0 ; --__count, ++__first, ++__cur)
|
||||
std::_Construct(&*__cur, *__first);
|
||||
return pair<_InputIter, _ForwardIter>(__first, __cur);
|
||||
}
|
||||
try
|
||||
{
|
||||
for ( ; __count > 0 ; --__count, ++__first, ++__cur)
|
||||
std::_Construct(&*__cur, *__first);
|
||||
return pair<_InputIter, _ForwardIter>(__first, __cur);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
std::_Destroy(__result, __cur);
|
||||
__throw_exception_again;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<typename _RandomAccessIter, typename _Size, typename _ForwardIter>
|
||||
inline pair<_RandomAccessIter, _ForwardIter>
|
||||
__uninitialized_copy_n(_RandomAccessIter __first, _Size __count,
|
||||
_ForwardIter __result,
|
||||
_ForwardIter __result,
|
||||
std::random_access_iterator_tag)
|
||||
{
|
||||
_RandomAccessIter __last = __first + __count;
|
||||
@ -108,7 +108,8 @@ namespace __gnu_cxx
|
||||
template<typename _InputIter, typename _Size, typename _ForwardIter>
|
||||
inline pair<_InputIter, _ForwardIter>
|
||||
__uninitialized_copy_n(_InputIter __first, _Size __count,
|
||||
_ForwardIter __result) {
|
||||
_ForwardIter __result)
|
||||
{
|
||||
return __uninitialized_copy_n(__first, __count, __result,
|
||||
__iterator_category(__first));
|
||||
}
|
||||
@ -126,7 +127,8 @@ namespace __gnu_cxx
|
||||
template<typename _InputIter, typename _Size, typename _ForwardIter>
|
||||
inline pair<_InputIter, _ForwardIter>
|
||||
uninitialized_copy_n(_InputIter __first, _Size __count,
|
||||
_ForwardIter __result) {
|
||||
_ForwardIter __result)
|
||||
{
|
||||
return __uninitialized_copy_n(__first, __count, __result,
|
||||
__iterator_category(__first));
|
||||
}
|
||||
@ -152,19 +154,18 @@ namespace __gnu_cxx
|
||||
*
|
||||
* @ingroup SGIextensions
|
||||
*/
|
||||
template <class _ForwardIterator,
|
||||
class _Tp
|
||||
template <class _ForwardIterator, class _Tp
|
||||
= typename std::iterator_traits<_ForwardIterator>::value_type >
|
||||
struct temporary_buffer : public _Temporary_buffer<_ForwardIterator, _Tp>
|
||||
{
|
||||
/// Requests storage large enough to hold a copy of [first,last).
|
||||
temporary_buffer(_ForwardIterator __first, _ForwardIterator __last)
|
||||
: _Temporary_buffer<_ForwardIterator, _Tp>(__first, __last) {}
|
||||
/// Destroys objects and frees storage.
|
||||
~temporary_buffer() {}
|
||||
};
|
||||
: _Temporary_buffer<_ForwardIterator, _Tp>(__first, __last) { }
|
||||
|
||||
/// Destroys objects and frees storage.
|
||||
~temporary_buffer() { }
|
||||
};
|
||||
} // namespace __gnu_cxx
|
||||
|
||||
#endif /* _EXT_MEMORY */
|
||||
#endif
|
||||
|
||||
|
@ -60,9 +60,10 @@
|
||||
*/
|
||||
|
||||
#ifndef _EXT_NUMERIC
|
||||
#define _EXT_NUMERIC
|
||||
#define _EXT_NUMERIC 1
|
||||
|
||||
#pragma GCC system_header
|
||||
|
||||
#include <bits/concept_check.h>
|
||||
#include <numeric>
|
||||
|
||||
@ -71,8 +72,7 @@
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
// Returns __x ** __n, where __n >= 0. _Note that "multiplication"
|
||||
// is required to be associative, but not necessarily commutative.
|
||||
|
||||
// is required to be associative, but not necessarily commutative.
|
||||
template<typename _Tp, typename _Integer, typename _MonoidOperation>
|
||||
_Tp
|
||||
__power(_Tp __x, _Integer __n, _MonoidOperation __monoid_op)
|
||||
@ -102,14 +102,13 @@ namespace __gnu_cxx
|
||||
__power(_Tp __x, _Integer __n)
|
||||
{ return __power(__x, __n, std::multiplies<_Tp>()); }
|
||||
|
||||
// Alias for the internal name __power. Note that power is an extension,
|
||||
// not part of the C++ standard.
|
||||
|
||||
/**
|
||||
* This is an SGI extension.
|
||||
* @ingroup SGIextensions
|
||||
* @doctodo
|
||||
*/
|
||||
// Alias for the internal name __power. Note that power is an extension,
|
||||
// not part of the C++ standard.
|
||||
template<typename _Tp, typename _Integer, typename _MonoidOperation>
|
||||
inline _Tp
|
||||
power(_Tp __x, _Integer __n, _MonoidOperation __monoid_op)
|
||||
@ -125,13 +124,12 @@ namespace __gnu_cxx
|
||||
power(_Tp __x, _Integer __n)
|
||||
{ return __power(__x, __n); }
|
||||
|
||||
// iota is not part of the C++ standard. It is an extension.
|
||||
|
||||
/**
|
||||
* This is an SGI extension.
|
||||
* @ingroup SGIextensions
|
||||
* @doctodo
|
||||
*/
|
||||
// iota is not part of the C++ standard. It is an extension.
|
||||
template<typename _ForwardIter, typename _Tp>
|
||||
void
|
||||
iota(_ForwardIter __first, _ForwardIter __last, _Tp __value)
|
||||
@ -144,8 +142,7 @@ namespace __gnu_cxx
|
||||
while (__first != __last)
|
||||
*__first++ = __value++;
|
||||
}
|
||||
|
||||
} // namespace __gnu_cxx
|
||||
|
||||
#endif /* _EXT_NUMERIC */
|
||||
#endif
|
||||
|
||||
|
@ -59,39 +59,39 @@
|
||||
* include this header if you are using GCC 3 or later.
|
||||
*/
|
||||
|
||||
#ifndef _EXT_RB_TREE
|
||||
#define _EXT_RB_TREE
|
||||
#ifndef _RB_TREE
|
||||
#define _RB_TREE 1
|
||||
|
||||
#pragma GCC system_header
|
||||
|
||||
#include <bits/stl_tree.h>
|
||||
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
using std::_Rb_tree;
|
||||
using std::allocator;
|
||||
|
||||
// Class rb_tree is not part of the C++ standard. It is provided for
|
||||
// compatibility with the HP STL.
|
||||
|
||||
/**
|
||||
* This is an SGI extension.
|
||||
* @ingroup SGIextensions
|
||||
* @doctodo
|
||||
*/
|
||||
template <class _Key, class _Value, class _KeyOfValue, class _Compare,
|
||||
class _Alloc = allocator<_Value> >
|
||||
struct rb_tree : public _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>
|
||||
{
|
||||
typedef _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc> _Base;
|
||||
typedef typename _Base::allocator_type allocator_type;
|
||||
|
||||
rb_tree(const _Compare& __comp = _Compare(),
|
||||
const allocator_type& __a = allocator_type())
|
||||
: _Base(__comp, __a) {}
|
||||
using std::_Rb_tree;
|
||||
using std::allocator;
|
||||
|
||||
~rb_tree() {}
|
||||
};
|
||||
// Class rb_tree is not part of the C++ standard. It is provided for
|
||||
// compatibility with the HP STL.
|
||||
|
||||
/**
|
||||
* This is an SGI extension.
|
||||
* @ingroup SGIextensions
|
||||
* @doctodo
|
||||
*/
|
||||
template <class _Key, class _Value, class _KeyOfValue, class _Compare,
|
||||
class _Alloc = allocator<_Value> >
|
||||
struct rb_tree : public _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>
|
||||
{
|
||||
typedef _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc> _Base;
|
||||
typedef typename _Base::allocator_type allocator_type;
|
||||
|
||||
rb_tree(const _Compare& __comp = _Compare(),
|
||||
const allocator_type& __a = allocator_type())
|
||||
: _Base(__comp, __a) { }
|
||||
|
||||
~rb_tree() { }
|
||||
};
|
||||
} // namespace __gnu_cxx
|
||||
|
||||
#endif /* _EXT_RB_TREE */
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -55,13 +55,13 @@
|
||||
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
using std::size_t;
|
||||
using std::printf;
|
||||
using std::basic_ostream;
|
||||
using std::__throw_length_error;
|
||||
using std::__alloc;
|
||||
using std::_Destroy;
|
||||
using std::uninitialized_fill_n;
|
||||
using std::size_t;
|
||||
using std::printf;
|
||||
using std::basic_ostream;
|
||||
using std::__throw_length_error;
|
||||
using std::__alloc;
|
||||
using std::_Destroy;
|
||||
using std::uninitialized_fill_n;
|
||||
|
||||
// Set buf_start, buf_end, and buf_ptr appropriately, filling tmp_buf
|
||||
// if necessary. Assumes _M_path_end[leaf_index] and leaf_pos are correct.
|
||||
|
@ -47,8 +47,8 @@
|
||||
* include this header if you are using GCC 3 or later.
|
||||
*/
|
||||
|
||||
#ifndef __SGI_STL_INTERNAL_SLIST_H
|
||||
#define __SGI_STL_INTERNAL_SLIST_H
|
||||
#ifndef _SLIST
|
||||
#define _SLIST 1
|
||||
|
||||
#include <bits/stl_algobase.h>
|
||||
#include <bits/stl_alloc.h>
|
||||
@ -950,8 +950,4 @@ public:
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif /* __SGI_STL_INTERNAL_SLIST_H */
|
||||
|
||||
// Local Variables:
|
||||
// mode:C++
|
||||
// End:
|
||||
#endif
|
||||
|
@ -31,8 +31,8 @@
|
||||
* This file is a GNU extension to the Standard C++ Library.
|
||||
*/
|
||||
|
||||
#ifndef _EXT_STDIO_FILEBUF
|
||||
#define _EXT_STDIO_FILEBUF
|
||||
#ifndef _STDIO_FILEBUF_H
|
||||
#define _STDIO_FILEBUF_H 1
|
||||
|
||||
#pragma GCC system_header
|
||||
|
||||
|
@ -31,8 +31,8 @@
|
||||
* This file is a GNU extension to the Standard C++ Library.
|
||||
*/
|
||||
|
||||
#ifndef _EXT_STDIO_SYNC_FILEBUF
|
||||
#define _EXT_STDIO_SYNC_FILEBUF
|
||||
#ifndef _STDIO_SYNC_FILEBUF_H
|
||||
#define _STDIO_SYNC_FILEBUF_H 1
|
||||
|
||||
#pragma GCC system_header
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user