libstdc++.exp: Check CXXFLAGS.
2007-09-06 Benjamin Kosnik <bkoz@redhat.com> * testsuite/lib/libstdc++.exp: Check CXXFLAGS. * scripts/testsuite_flags.in: CXXFLAGS_default, matching dejagnu. * include/std/ostream: Spacing tweak. * include/ext/hashtable.h: Use <algorithm>. * include/ext/slist: Same. * include/ext/rope: Same. * include/bits/stl_function.h: Format. * include/tr1_impl/array: Remove section number in doxygen markup. * src/list.cc: Comment tweak. * docs/doxygen/user.cfg.in: Update for include/tr1_impl. * testsuite/25_algorithms/search_n/iterator.cc: Add using declaration. * testsuite/25_algorithms/nth_element/1.cc: Same. * testsuite/21_strings/char_traits/requirements/short/1.cc: Use char_type typedef to the underlying character type. * testsuite/21_strings/char_traits/requirements/wchar_t/typedefs.cc: Remove -ansi -pedantic-errors. * testsuite/21_strings/char_traits/requirements/char/typedefs.cc: Same. * testsuite/tr1/6_containers/headers/functional/synopsis.cc: Remove specializations. From-SVN: r128225
This commit is contained in:
parent
62a4a967a9
commit
bd1a56a0c3
|
@ -1,3 +1,28 @@
|
|||
2007-09-06 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* testsuite/lib/libstdc++.exp: Check CXXFLAGS.
|
||||
* scripts/testsuite_flags.in: CXXFLAGS_default, matching dejagnu.
|
||||
|
||||
* include/std/ostream: Spacing tweak.
|
||||
* include/ext/hashtable.h: Use <algorithm>.
|
||||
* include/ext/slist: Same.
|
||||
* include/ext/rope: Same.
|
||||
* include/bits/stl_function.h: Format.
|
||||
* include/tr1_impl/array: Remove section number in doxygen markup.
|
||||
* src/list.cc: Comment tweak.
|
||||
|
||||
* docs/doxygen/user.cfg.in: Update for include/tr1_impl.
|
||||
|
||||
* testsuite/25_algorithms/search_n/iterator.cc: Add using declaration.
|
||||
* testsuite/25_algorithms/nth_element/1.cc: Same.
|
||||
* testsuite/21_strings/char_traits/requirements/short/1.cc: Use
|
||||
char_type typedef to the underlying character type.
|
||||
* testsuite/21_strings/char_traits/requirements/wchar_t/typedefs.cc:
|
||||
Remove -ansi -pedantic-errors.
|
||||
* testsuite/21_strings/char_traits/requirements/char/typedefs.cc: Same.
|
||||
* testsuite/tr1/6_containers/headers/functional/synopsis.cc:
|
||||
Remove specializations.
|
||||
|
||||
2007-09-06 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
* include/bits/stl_vector.h (_Vector_base<>::_M_allocate):
|
||||
|
|
|
@ -60,6 +60,9 @@
|
|||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define if EBADMSG exists. */
|
||||
#undef HAVE_EBADMSG
|
||||
|
||||
/* Define to 1 if you have the <endian.h> header file. */
|
||||
#undef HAVE_ENDIAN_H
|
||||
|
||||
|
|
|
@ -300,7 +300,7 @@ INTERNAL_DOCS = NO
|
|||
# in case and if your file system supports case sensitive file names. Windows
|
||||
# and Mac users are advised to set this option to NO.
|
||||
|
||||
CASE_SENSE_NAMES = NO#
|
||||
CASE_SENSE_NAMES = NO
|
||||
|
||||
# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
|
||||
# will show members with their full class and namespace scopes in the
|
||||
|
@ -480,6 +480,7 @@ INPUT = @srcdir@/docs/doxygen/doxygroups.cc \
|
|||
include/debug \
|
||||
include/ext \
|
||||
include/tr1 \
|
||||
include/tr1_impl \
|
||||
include/algorithm \
|
||||
include/array \
|
||||
include/bitset \
|
||||
|
@ -580,7 +581,7 @@ INPUT = @srcdir@/docs/doxygen/doxygroups.cc \
|
|||
include/tr1/cwchar \
|
||||
include/tr1/cwctype \
|
||||
include/tr1/functional \
|
||||
include/tr1/hashtable \
|
||||
include/tr1/hashtable.h \
|
||||
include/tr1/memory \
|
||||
include/tr1/random \
|
||||
include/tr1/regex \
|
||||
|
@ -588,7 +589,26 @@ INPUT = @srcdir@/docs/doxygen/doxygroups.cc \
|
|||
include/tr1/type_traits \
|
||||
include/tr1/unordered_map \
|
||||
include/tr1/unordered_set \
|
||||
include/tr1/utility
|
||||
include/tr1_impl/utility \
|
||||
include/tr1_impl/array \
|
||||
include/tr1_impl/cctype \
|
||||
include/tr1_impl/cfenv \
|
||||
include/tr1_impl/cinttypes \
|
||||
include/tr1_impl/cmath \
|
||||
include/tr1_impl/complex \
|
||||
include/tr1_impl/cstdint \
|
||||
include/tr1_impl/cstdio \
|
||||
include/tr1_impl/cstdlib \
|
||||
include/tr1_impl/cwchar \
|
||||
include/tr1_impl/cwctype \
|
||||
include/tr1_impl/functional \
|
||||
include/tr1_impl/random \
|
||||
include/tr1_impl/regex \
|
||||
include/tr1_impl/tuple \
|
||||
include/tr1_impl/type_traits \
|
||||
include/tr1_impl/unordered_map \
|
||||
include/tr1_impl/unordered_set \
|
||||
include/tr1_impl/utility
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# FILE_PATTERNS tag to specify one or more wildcard pattern (like
|
||||
|
@ -1284,8 +1304,7 @@ UML_LOOK = NO
|
|||
# If set to YES, the inheritance and collaboration graphs will show the
|
||||
# relations between templates and their instances.
|
||||
|
||||
#TEMPLATE_RELATIONS = YES
|
||||
TEMPLATE_RELATIONS = NO
|
||||
TEMPLATE_RELATIONS = YES
|
||||
|
||||
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
|
||||
# tags are set to YES then doxygen will generate a graph for each documented
|
||||
|
|
|
@ -99,7 +99,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
/**
|
||||
* This is one of the @link s20_3_1_base functor base classes@endlink.
|
||||
*/
|
||||
template <class _Arg, class _Result>
|
||||
template<typename _Arg, typename _Result>
|
||||
struct unary_function
|
||||
{
|
||||
typedef _Arg argument_type; ///< @c argument_type is the type of the
|
||||
|
@ -111,7 +111,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
/**
|
||||
* This is one of the @link s20_3_1_base functor base classes@endlink.
|
||||
*/
|
||||
template <class _Arg1, class _Arg2, class _Result>
|
||||
template<typename _Arg1, typename _Arg2, typename _Result>
|
||||
struct binary_function
|
||||
{
|
||||
typedef _Arg1 first_argument_type; ///< the type of the first argument
|
||||
|
@ -133,7 +133,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
* @{
|
||||
*/
|
||||
/// One of the @link s20_3_2_arithmetic math functors@endlink.
|
||||
template <class _Tp>
|
||||
template<typename _Tp>
|
||||
struct plus : public binary_function<_Tp, _Tp, _Tp>
|
||||
{
|
||||
_Tp
|
||||
|
@ -142,7 +142,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
};
|
||||
|
||||
/// One of the @link s20_3_2_arithmetic math functors@endlink.
|
||||
template <class _Tp>
|
||||
template<typename _Tp>
|
||||
struct minus : public binary_function<_Tp, _Tp, _Tp>
|
||||
{
|
||||
_Tp
|
||||
|
@ -151,7 +151,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
};
|
||||
|
||||
/// One of the @link s20_3_2_arithmetic math functors@endlink.
|
||||
template <class _Tp>
|
||||
template<typename _Tp>
|
||||
struct multiplies : public binary_function<_Tp, _Tp, _Tp>
|
||||
{
|
||||
_Tp
|
||||
|
@ -160,7 +160,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
};
|
||||
|
||||
/// One of the @link s20_3_2_arithmetic math functors@endlink.
|
||||
template <class _Tp>
|
||||
template<typename _Tp>
|
||||
struct divides : public binary_function<_Tp, _Tp, _Tp>
|
||||
{
|
||||
_Tp
|
||||
|
@ -169,7 +169,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
};
|
||||
|
||||
/// One of the @link s20_3_2_arithmetic math functors@endlink.
|
||||
template <class _Tp>
|
||||
template<typename _Tp>
|
||||
struct modulus : public binary_function<_Tp, _Tp, _Tp>
|
||||
{
|
||||
_Tp
|
||||
|
@ -178,7 +178,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
};
|
||||
|
||||
/// One of the @link s20_3_2_arithmetic math functors@endlink.
|
||||
template <class _Tp>
|
||||
template<typename _Tp>
|
||||
struct negate : public unary_function<_Tp, _Tp>
|
||||
{
|
||||
_Tp
|
||||
|
@ -195,7 +195,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
* @{
|
||||
*/
|
||||
/// One of the @link s20_3_3_comparisons comparison functors@endlink.
|
||||
template <class _Tp>
|
||||
template<typename _Tp>
|
||||
struct equal_to : public binary_function<_Tp, _Tp, bool>
|
||||
{
|
||||
bool
|
||||
|
@ -204,7 +204,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
};
|
||||
|
||||
/// One of the @link s20_3_3_comparisons comparison functors@endlink.
|
||||
template <class _Tp>
|
||||
template<typename _Tp>
|
||||
struct not_equal_to : public binary_function<_Tp, _Tp, bool>
|
||||
{
|
||||
bool
|
||||
|
@ -213,7 +213,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
};
|
||||
|
||||
/// One of the @link s20_3_3_comparisons comparison functors@endlink.
|
||||
template <class _Tp>
|
||||
template<typename _Tp>
|
||||
struct greater : public binary_function<_Tp, _Tp, bool>
|
||||
{
|
||||
bool
|
||||
|
@ -222,7 +222,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
};
|
||||
|
||||
/// One of the @link s20_3_3_comparisons comparison functors@endlink.
|
||||
template <class _Tp>
|
||||
template<typename _Tp>
|
||||
struct less : public binary_function<_Tp, _Tp, bool>
|
||||
{
|
||||
bool
|
||||
|
@ -231,7 +231,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
};
|
||||
|
||||
/// One of the @link s20_3_3_comparisons comparison functors@endlink.
|
||||
template <class _Tp>
|
||||
template<typename _Tp>
|
||||
struct greater_equal : public binary_function<_Tp, _Tp, bool>
|
||||
{
|
||||
bool
|
||||
|
@ -240,7 +240,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
};
|
||||
|
||||
/// One of the @link s20_3_3_comparisons comparison functors@endlink.
|
||||
template <class _Tp>
|
||||
template<typename _Tp>
|
||||
struct less_equal : public binary_function<_Tp, _Tp, bool>
|
||||
{
|
||||
bool
|
||||
|
@ -257,7 +257,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
* @{
|
||||
*/
|
||||
/// One of the @link s20_3_4_logical Boolean operations functors@endlink.
|
||||
template <class _Tp>
|
||||
template<typename _Tp>
|
||||
struct logical_and : public binary_function<_Tp, _Tp, bool>
|
||||
{
|
||||
bool
|
||||
|
@ -266,7 +266,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
};
|
||||
|
||||
/// One of the @link s20_3_4_logical Boolean operations functors@endlink.
|
||||
template <class _Tp>
|
||||
template<typename _Tp>
|
||||
struct logical_or : public binary_function<_Tp, _Tp, bool>
|
||||
{
|
||||
bool
|
||||
|
@ -275,7 +275,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
};
|
||||
|
||||
/// One of the @link s20_3_4_logical Boolean operations functors@endlink.
|
||||
template <class _Tp>
|
||||
template<typename _Tp>
|
||||
struct logical_not : public unary_function<_Tp, bool>
|
||||
{
|
||||
bool
|
||||
|
@ -286,7 +286,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
|
||||
// _GLIBCXX_RESOLVE_LIB_DEFECTS
|
||||
// DR 660. Missing Bitwise Operations.
|
||||
template <class _Tp>
|
||||
template<typename _Tp>
|
||||
struct bit_and : public binary_function<_Tp, _Tp, _Tp>
|
||||
{
|
||||
_Tp
|
||||
|
@ -294,7 +294,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
{ return __x & __y; }
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
template<typename _Tp>
|
||||
struct bit_or : public binary_function<_Tp, _Tp, _Tp>
|
||||
{
|
||||
_Tp
|
||||
|
@ -302,7 +302,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
{ return __x | __y; }
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
template<typename _Tp>
|
||||
struct bit_xor : public binary_function<_Tp, _Tp, _Tp>
|
||||
{
|
||||
_Tp
|
||||
|
@ -338,15 +338,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
* @{
|
||||
*/
|
||||
/// One of the @link s20_3_5_negators negation functors@endlink.
|
||||
template <class _Predicate>
|
||||
template<typename _Predicate>
|
||||
class unary_negate
|
||||
: public unary_function<typename _Predicate::argument_type, bool>
|
||||
{
|
||||
protected:
|
||||
_Predicate _M_pred;
|
||||
|
||||
public:
|
||||
explicit
|
||||
unary_negate(const _Predicate& __x) : _M_pred(__x) {}
|
||||
unary_negate(const _Predicate& __x) : _M_pred(__x) { }
|
||||
|
||||
bool
|
||||
operator()(const typename _Predicate::argument_type& __x) const
|
||||
|
@ -354,13 +355,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
};
|
||||
|
||||
/// One of the @link s20_3_5_negators negation functors@endlink.
|
||||
template <class _Predicate>
|
||||
template<typename _Predicate>
|
||||
inline unary_negate<_Predicate>
|
||||
not1(const _Predicate& __pred)
|
||||
{ return unary_negate<_Predicate>(__pred); }
|
||||
|
||||
/// One of the @link s20_3_5_negators negation functors@endlink.
|
||||
template <class _Predicate>
|
||||
template<typename _Predicate>
|
||||
class binary_negate
|
||||
: public binary_function<typename _Predicate::first_argument_type,
|
||||
typename _Predicate::second_argument_type, bool>
|
||||
|
@ -379,7 +380,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
};
|
||||
|
||||
/// One of the @link s20_3_5_negators negation functors@endlink.
|
||||
template <class _Predicate>
|
||||
template<typename _Predicate>
|
||||
inline binary_negate<_Predicate>
|
||||
not2(const _Predicate& __pred)
|
||||
{ return binary_negate<_Predicate>(__pred); }
|
||||
|
@ -417,7 +418,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
* @{
|
||||
*/
|
||||
/// One of the @link s20_3_6_binder binder functors@endlink.
|
||||
template <class _Operation>
|
||||
template<typename _Operation>
|
||||
class binder1st
|
||||
: public unary_function<typename _Operation::second_argument_type,
|
||||
typename _Operation::result_type>
|
||||
|
@ -425,10 +426,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
protected:
|
||||
_Operation op;
|
||||
typename _Operation::first_argument_type value;
|
||||
|
||||
public:
|
||||
binder1st(const _Operation& __x,
|
||||
const typename _Operation::first_argument_type& __y)
|
||||
: op(__x), value(__y) {}
|
||||
: op(__x), value(__y) { }
|
||||
|
||||
typename _Operation::result_type
|
||||
operator()(const typename _Operation::second_argument_type& __x) const
|
||||
|
@ -442,7 +444,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
};
|
||||
|
||||
/// One of the @link s20_3_6_binder binder functors@endlink.
|
||||
template <class _Operation, class _Tp>
|
||||
template<typename _Operation, typename _Tp>
|
||||
inline binder1st<_Operation>
|
||||
bind1st(const _Operation& __fn, const _Tp& __x)
|
||||
{
|
||||
|
@ -451,7 +453,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
}
|
||||
|
||||
/// One of the @link s20_3_6_binder binder functors@endlink.
|
||||
template <class _Operation>
|
||||
template<typename _Operation>
|
||||
class binder2nd
|
||||
: public unary_function<typename _Operation::first_argument_type,
|
||||
typename _Operation::result_type>
|
||||
|
@ -459,10 +461,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
protected:
|
||||
_Operation op;
|
||||
typename _Operation::second_argument_type value;
|
||||
|
||||
public:
|
||||
binder2nd(const _Operation& __x,
|
||||
const typename _Operation::second_argument_type& __y)
|
||||
: op(__x), value(__y) {}
|
||||
: op(__x), value(__y) { }
|
||||
|
||||
typename _Operation::result_type
|
||||
operator()(const typename _Operation::first_argument_type& __x) const
|
||||
|
@ -476,7 +479,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
};
|
||||
|
||||
/// One of the @link s20_3_6_binder binder functors@endlink.
|
||||
template <class _Operation, class _Tp>
|
||||
template<typename _Operation, typename _Tp>
|
||||
inline binder2nd<_Operation>
|
||||
bind2nd(const _Operation& __fn, const _Tp& __x)
|
||||
{
|
||||
|
@ -506,17 +509,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
* @{
|
||||
*/
|
||||
/// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
|
||||
template <class _Arg, class _Result>
|
||||
template<typename _Arg, typename _Result>
|
||||
class pointer_to_unary_function : public unary_function<_Arg, _Result>
|
||||
{
|
||||
protected:
|
||||
_Result (*_M_ptr)(_Arg);
|
||||
|
||||
public:
|
||||
pointer_to_unary_function() {}
|
||||
pointer_to_unary_function() { }
|
||||
|
||||
explicit
|
||||
pointer_to_unary_function(_Result (*__x)(_Arg))
|
||||
: _M_ptr(__x) {}
|
||||
: _M_ptr(__x) { }
|
||||
|
||||
_Result
|
||||
operator()(_Arg __x) const
|
||||
|
@ -524,24 +528,25 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
};
|
||||
|
||||
/// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
|
||||
template <class _Arg, class _Result>
|
||||
template<typename _Arg, typename _Result>
|
||||
inline pointer_to_unary_function<_Arg, _Result>
|
||||
ptr_fun(_Result (*__x)(_Arg))
|
||||
{ return pointer_to_unary_function<_Arg, _Result>(__x); }
|
||||
|
||||
/// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
|
||||
template <class _Arg1, class _Arg2, class _Result>
|
||||
template<typename _Arg1, typename _Arg2, typename _Result>
|
||||
class pointer_to_binary_function
|
||||
: public binary_function<_Arg1, _Arg2, _Result>
|
||||
{
|
||||
protected:
|
||||
_Result (*_M_ptr)(_Arg1, _Arg2);
|
||||
|
||||
public:
|
||||
pointer_to_binary_function() {}
|
||||
pointer_to_binary_function() { }
|
||||
|
||||
explicit
|
||||
pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2))
|
||||
: _M_ptr(__x) {}
|
||||
: _M_ptr(__x) { }
|
||||
|
||||
_Result
|
||||
operator()(_Arg1 __x, _Arg2 __y) const
|
||||
|
@ -549,13 +554,13 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
};
|
||||
|
||||
/// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
|
||||
template <class _Arg1, class _Arg2, class _Result>
|
||||
template<typename _Arg1, typename _Arg2, typename _Result>
|
||||
inline pointer_to_binary_function<_Arg1, _Arg2, _Result>
|
||||
ptr_fun(_Result (*__x)(_Arg1, _Arg2))
|
||||
{ return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); }
|
||||
/** @} */
|
||||
|
||||
template <class _Tp>
|
||||
template<typename _Tp>
|
||||
struct _Identity : public unary_function<_Tp,_Tp>
|
||||
{
|
||||
_Tp&
|
||||
|
@ -567,7 +572,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
{ return __x; }
|
||||
};
|
||||
|
||||
template <class _Pair>
|
||||
template<typename _Pair>
|
||||
struct _Select1st : public unary_function<_Pair,
|
||||
typename _Pair::first_type>
|
||||
{
|
||||
|
@ -580,7 +585,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
{ return __x.first; }
|
||||
};
|
||||
|
||||
template <class _Pair>
|
||||
template<typename _Pair>
|
||||
struct _Select2nd : public unary_function<_Pair,
|
||||
typename _Pair::second_type>
|
||||
{
|
||||
|
@ -609,178 +614,186 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
*/
|
||||
/// One of the @link s20_3_8_memadaptors adaptors for member
|
||||
/// pointers@endlink.
|
||||
template <class _Ret, class _Tp>
|
||||
template<typename _Ret, typename _Tp>
|
||||
class mem_fun_t : public unary_function<_Tp*, _Ret>
|
||||
{
|
||||
public:
|
||||
explicit
|
||||
mem_fun_t(_Ret (_Tp::*__pf)())
|
||||
: _M_f(__pf) {}
|
||||
: _M_f(__pf) { }
|
||||
|
||||
_Ret
|
||||
operator()(_Tp* __p) const
|
||||
{ return (__p->*_M_f)(); }
|
||||
|
||||
private:
|
||||
_Ret (_Tp::*_M_f)();
|
||||
};
|
||||
|
||||
/// One of the @link s20_3_8_memadaptors adaptors for member
|
||||
/// pointers@endlink.
|
||||
template <class _Ret, class _Tp>
|
||||
template<typename _Ret, typename _Tp>
|
||||
class const_mem_fun_t : public unary_function<const _Tp*, _Ret>
|
||||
{
|
||||
public:
|
||||
explicit
|
||||
const_mem_fun_t(_Ret (_Tp::*__pf)() const)
|
||||
: _M_f(__pf) {}
|
||||
: _M_f(__pf) { }
|
||||
|
||||
_Ret
|
||||
operator()(const _Tp* __p) const
|
||||
{ return (__p->*_M_f)(); }
|
||||
|
||||
private:
|
||||
_Ret (_Tp::*_M_f)() const;
|
||||
};
|
||||
|
||||
/// One of the @link s20_3_8_memadaptors adaptors for member
|
||||
/// pointers@endlink.
|
||||
template <class _Ret, class _Tp>
|
||||
template<typename _Ret, typename _Tp>
|
||||
class mem_fun_ref_t : public unary_function<_Tp, _Ret>
|
||||
{
|
||||
public:
|
||||
explicit
|
||||
mem_fun_ref_t(_Ret (_Tp::*__pf)())
|
||||
: _M_f(__pf) {}
|
||||
: _M_f(__pf) { }
|
||||
|
||||
_Ret
|
||||
operator()(_Tp& __r) const
|
||||
{ return (__r.*_M_f)(); }
|
||||
|
||||
private:
|
||||
_Ret (_Tp::*_M_f)();
|
||||
};
|
||||
|
||||
/// One of the @link s20_3_8_memadaptors adaptors for member
|
||||
/// pointers@endlink.
|
||||
template <class _Ret, class _Tp>
|
||||
template<typename _Ret, typename _Tp>
|
||||
class const_mem_fun_ref_t : public unary_function<_Tp, _Ret>
|
||||
{
|
||||
public:
|
||||
explicit
|
||||
const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const)
|
||||
: _M_f(__pf) {}
|
||||
: _M_f(__pf) { }
|
||||
|
||||
_Ret
|
||||
operator()(const _Tp& __r) const
|
||||
{ return (__r.*_M_f)(); }
|
||||
|
||||
private:
|
||||
_Ret (_Tp::*_M_f)() const;
|
||||
};
|
||||
|
||||
/// One of the @link s20_3_8_memadaptors adaptors for member
|
||||
/// pointers@endlink.
|
||||
template <class _Ret, class _Tp, class _Arg>
|
||||
template<typename _Ret, typename _Tp, typename _Arg>
|
||||
class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret>
|
||||
{
|
||||
public:
|
||||
explicit
|
||||
mem_fun1_t(_Ret (_Tp::*__pf)(_Arg))
|
||||
: _M_f(__pf) {}
|
||||
: _M_f(__pf) { }
|
||||
|
||||
_Ret
|
||||
operator()(_Tp* __p, _Arg __x) const
|
||||
{ return (__p->*_M_f)(__x); }
|
||||
|
||||
private:
|
||||
_Ret (_Tp::*_M_f)(_Arg);
|
||||
};
|
||||
|
||||
/// One of the @link s20_3_8_memadaptors adaptors for member
|
||||
/// pointers@endlink.
|
||||
template <class _Ret, class _Tp, class _Arg>
|
||||
template<typename _Ret, typename _Tp, typename _Arg>
|
||||
class const_mem_fun1_t : public binary_function<const _Tp*, _Arg, _Ret>
|
||||
{
|
||||
public:
|
||||
explicit
|
||||
const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const)
|
||||
: _M_f(__pf) {}
|
||||
: _M_f(__pf) { }
|
||||
|
||||
_Ret
|
||||
operator()(const _Tp* __p, _Arg __x) const
|
||||
{ return (__p->*_M_f)(__x); }
|
||||
|
||||
private:
|
||||
_Ret (_Tp::*_M_f)(_Arg) const;
|
||||
};
|
||||
|
||||
/// One of the @link s20_3_8_memadaptors adaptors for member
|
||||
/// pointers@endlink.
|
||||
template <class _Ret, class _Tp, class _Arg>
|
||||
template<typename _Ret, typename _Tp, typename _Arg>
|
||||
class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
|
||||
{
|
||||
public:
|
||||
explicit
|
||||
mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg))
|
||||
: _M_f(__pf) {}
|
||||
: _M_f(__pf) { }
|
||||
|
||||
_Ret
|
||||
operator()(_Tp& __r, _Arg __x) const
|
||||
{ return (__r.*_M_f)(__x); }
|
||||
|
||||
private:
|
||||
_Ret (_Tp::*_M_f)(_Arg);
|
||||
};
|
||||
|
||||
/// One of the @link s20_3_8_memadaptors adaptors for member
|
||||
/// pointers@endlink.
|
||||
template <class _Ret, class _Tp, class _Arg>
|
||||
template<typename _Ret, typename _Tp, typename _Arg>
|
||||
class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
|
||||
{
|
||||
public:
|
||||
explicit
|
||||
const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const)
|
||||
: _M_f(__pf) {}
|
||||
: _M_f(__pf) { }
|
||||
|
||||
_Ret
|
||||
operator()(const _Tp& __r, _Arg __x) const
|
||||
{ return (__r.*_M_f)(__x); }
|
||||
|
||||
private:
|
||||
_Ret (_Tp::*_M_f)(_Arg) const;
|
||||
};
|
||||
|
||||
// Mem_fun adaptor helper functions. There are only two:
|
||||
// mem_fun and mem_fun_ref.
|
||||
template <class _Ret, class _Tp>
|
||||
template<typename _Ret, typename _Tp>
|
||||
inline mem_fun_t<_Ret, _Tp>
|
||||
mem_fun(_Ret (_Tp::*__f)())
|
||||
{ return mem_fun_t<_Ret, _Tp>(__f); }
|
||||
|
||||
template <class _Ret, class _Tp>
|
||||
template<typename _Ret, typename _Tp>
|
||||
inline const_mem_fun_t<_Ret, _Tp>
|
||||
mem_fun(_Ret (_Tp::*__f)() const)
|
||||
{ return const_mem_fun_t<_Ret, _Tp>(__f); }
|
||||
|
||||
template <class _Ret, class _Tp>
|
||||
template<typename _Ret, typename _Tp>
|
||||
inline mem_fun_ref_t<_Ret, _Tp>
|
||||
mem_fun_ref(_Ret (_Tp::*__f)())
|
||||
{ return mem_fun_ref_t<_Ret, _Tp>(__f); }
|
||||
|
||||
template <class _Ret, class _Tp>
|
||||
template<typename _Ret, typename _Tp>
|
||||
inline const_mem_fun_ref_t<_Ret, _Tp>
|
||||
mem_fun_ref(_Ret (_Tp::*__f)() const)
|
||||
{ return const_mem_fun_ref_t<_Ret, _Tp>(__f); }
|
||||
|
||||
template <class _Ret, class _Tp, class _Arg>
|
||||
template<typename _Ret, typename _Tp, typename _Arg>
|
||||
inline mem_fun1_t<_Ret, _Tp, _Arg>
|
||||
mem_fun(_Ret (_Tp::*__f)(_Arg))
|
||||
{ return mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
|
||||
|
||||
template <class _Ret, class _Tp, class _Arg>
|
||||
template<typename _Ret, typename _Tp, typename _Arg>
|
||||
inline const_mem_fun1_t<_Ret, _Tp, _Arg>
|
||||
mem_fun(_Ret (_Tp::*__f)(_Arg) const)
|
||||
{ return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); }
|
||||
|
||||
template <class _Ret, class _Tp, class _Arg>
|
||||
template<typename _Ret, typename _Tp, typename _Arg>
|
||||
inline mem_fun1_ref_t<_Ret, _Tp, _Arg>
|
||||
mem_fun_ref(_Ret (_Tp::*__f)(_Arg))
|
||||
{ return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
|
||||
|
||||
template <class _Ret, class _Tp, class _Arg>
|
||||
template<typename _Ret, typename _Tp, typename _Arg>
|
||||
inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg>
|
||||
mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const)
|
||||
{ return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Hashtable implementation used by containers -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
|
||||
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||
// Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
|
@ -67,7 +67,7 @@
|
|||
|
||||
#include <vector>
|
||||
#include <iterator>
|
||||
#include <bits/stl_algo.h>
|
||||
#include <algorithm>
|
||||
#include <bits/stl_function.h>
|
||||
#include <ext/hash_fun.h>
|
||||
|
||||
|
|
|
@ -49,15 +49,14 @@
|
|||
#ifndef _ROPE
|
||||
#define _ROPE 1
|
||||
|
||||
#include <bits/stl_algobase.h>
|
||||
#include <algorithm>
|
||||
#include <iosfwd>
|
||||
#include <bits/stl_construct.h>
|
||||
#include <bits/stl_uninitialized.h>
|
||||
#include <bits/stl_algo.h>
|
||||
#include <bits/stl_function.h>
|
||||
#include <bits/stl_numeric.h>
|
||||
#include <bits/allocator.h>
|
||||
#include <ext/hash_fun.h>
|
||||
#include <iosfwd>
|
||||
#include <bits/gthr.h>
|
||||
|
||||
# ifdef __GC
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Singly-linked list implementation -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
|
||||
// Copyright (C) 2001, 2002, 2004, 2005, 2007 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
|
||||
|
@ -49,7 +49,7 @@
|
|||
#ifndef _SLIST
|
||||
#define _SLIST 1
|
||||
|
||||
#include <bits/stl_algobase.h>
|
||||
#include <algorithm>
|
||||
#include <bits/allocator.h>
|
||||
#include <bits/stl_construct.h>
|
||||
#include <bits/stl_uninitialized.h>
|
||||
|
|
|
@ -539,7 +539,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
template<typename _CharT, typename _Traits>
|
||||
inline basic_ostream<_CharT, _Traits>&
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __out, const error_code& __e)
|
||||
{ return (__out << __e.category().name().c_str() << ':' << __e.value()); }
|
||||
{ return (__out << __e.category().name().c_str() << ':' << __e.value()); }
|
||||
#endif
|
||||
|
||||
// [27.6.2.7] standard basic_ostream manipulators
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace std
|
|||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE_TR1
|
||||
|
||||
/// @brief struct array [6.2.2].
|
||||
/// @brief struct array.
|
||||
/// NB: Requires complete type _Tp.
|
||||
template<typename _Tp, std::size_t _Nm>
|
||||
struct array
|
||||
|
|
|
@ -54,10 +54,9 @@ case ${query} in
|
|||
echo ${CC}
|
||||
;;
|
||||
--cxxflags)
|
||||
CXXFLAGS_save="-g -O2 -D_GLIBCXX_ASSERT"
|
||||
CXXFLAGS_config='@SECTION_FLAGS@ -fmessage-length=0
|
||||
@CXXFLAGS@ @EXTRA_CXX_FLAGS@ '
|
||||
echo ${CXXFLAGS_save} ${CXXFLAGS_config}
|
||||
CXXFLAGS_default="-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0"
|
||||
CXXFLAGS_config="@SECTION_FLAGS@ @CXXFLAGS@ @EXTRA_CXX_FLAGS@"
|
||||
echo ${CXXFLAGS_default} ${CXXFLAGS_config}
|
||||
;;
|
||||
--cxxpchflags)
|
||||
PCHFLAGS="@glibcxx_PCHFLAGS@"
|
||||
|
|
|
@ -115,7 +115,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
|
|||
do
|
||||
{
|
||||
std::swap(__tmp->_M_next, __tmp->_M_prev);
|
||||
__tmp = __tmp->_M_prev; // Old next node is now prev.
|
||||
|
||||
// Old next node is now prev.
|
||||
__tmp = __tmp->_M_prev;
|
||||
}
|
||||
while (__tmp != this);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// { dg-do compile }
|
||||
// { dg-options "-ansi -pedantic-errors" }
|
||||
// 2001-02-11 gdr
|
||||
// Origin: Craig Rodrigues <rodrigc@mediaone.net>
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
void test02(void)
|
||||
{
|
||||
typedef short char_type;
|
||||
bool test __attribute__((unused)) = true;
|
||||
|
||||
// 21.1.1 character traits requirements
|
||||
|
@ -45,67 +46,67 @@ void test02(void)
|
|||
// pos == X::pos_type
|
||||
// state == X::state_type
|
||||
|
||||
// void X::assign(short c, short d)
|
||||
// void X::assign(char_type c, char_type d)
|
||||
// assigns c = d;
|
||||
short c1 = 'z';
|
||||
short c2 = 'u';
|
||||
char_type c1 = 'z';
|
||||
char_type c2 = 'u';
|
||||
VERIFY( c1 != c2 );
|
||||
std::char_traits<short>::assign(c1,c2);
|
||||
std::char_traits<char_type>::assign(c1,c2);
|
||||
VERIFY( c1 == 'u' );
|
||||
|
||||
// bool X::eq(short c, short d)
|
||||
// bool X::eq(char_type c, char_type d)
|
||||
c1 = 'z';
|
||||
c2 = 'u';
|
||||
VERIFY ( !std::char_traits<short>::eq(c1, c2) );
|
||||
VERIFY ( std::char_traits<short>::eq(c1, c1) );
|
||||
VERIFY ( std::char_traits<short>::eq(c2, c2) );
|
||||
VERIFY ( !std::char_traits<char_type>::eq(c1, c2) );
|
||||
VERIFY ( std::char_traits<char_type>::eq(c1, c1) );
|
||||
VERIFY ( std::char_traits<char_type>::eq(c2, c2) );
|
||||
|
||||
// bool X::lt(short c, short d)
|
||||
// bool X::lt(char_type c, char_type d)
|
||||
c1 = 'z';
|
||||
c2 = 'u';
|
||||
VERIFY ( std::char_traits<short>::lt(c2, c1) );
|
||||
VERIFY ( !std::char_traits<short>::lt(c1, c2) );
|
||||
VERIFY ( !std::char_traits<short>::lt(c1, c1) );
|
||||
VERIFY ( !std::char_traits<short>::lt(c2, c2) );
|
||||
VERIFY ( std::char_traits<char_type>::lt(c2, c1) );
|
||||
VERIFY ( !std::char_traits<char_type>::lt(c1, c2) );
|
||||
VERIFY ( !std::char_traits<char_type>::lt(c1, c1) );
|
||||
VERIFY ( !std::char_traits<char_type>::lt(c2, c2) );
|
||||
|
||||
// short* X::move(short* s, const short* p, size_t n)
|
||||
// char_type* X::move(char_type* s, const char_type* p, size_t n)
|
||||
// for each i in [0,n) performs X::assign(s[i], p[i]). Copies
|
||||
// correctly even where p is in [s, s + n), and yields s.
|
||||
short array1[] = {'z', 'u', 'm', 'a', ' ', 'b', 'e', 'a', 'c', 'h', 0};
|
||||
const std::basic_string<short> str_01(array1 + 0, array1 + 10);
|
||||
char_type array1[] = {'z', 'u', 'm', 'a', ' ', 'b', 'e', 'a', 'c', 'h', 0};
|
||||
const std::basic_string<char_type> str_01(array1 + 0, array1 + 10);
|
||||
|
||||
const short str_lit1[] = {'m', 'o', 'n', 't', 'a', 'r', 'a', ' ', 'a', 'n', 'd', ' ', 'o', 'c', 'e', 'a', 'n', ' ', 'b', 'e', 'a', 'c', 'h', 0};
|
||||
const char_type str_lit1[] = {'m', 'o', 'n', 't', 'a', 'r', 'a', ' ', 'a', 'n', 'd', ' ', 'o', 'c', 'e', 'a', 'n', ' ', 'b', 'e', 'a', 'c', 'h', 0};
|
||||
|
||||
int len = sizeof(str_lit1)/sizeof(short) + sizeof(array1)/sizeof(short) - 1;
|
||||
int len = sizeof(str_lit1)/sizeof(char_type) + sizeof(array1)/sizeof(char_type) - 1;
|
||||
// two terminating chars
|
||||
short array3[] = {'b', 'o', 'r', 'a', 'c', 'a', 'y', ',', ' ', 'p', 'h', 'i', 'l', 'i', 'p', 'p', 'i', 'n', 'e', 's', 0};
|
||||
short array2[len];
|
||||
std::char_traits<short>::copy(array2, array3, len);
|
||||
char_type array3[] = {'b', 'o', 'r', 'a', 'c', 'a', 'y', ',', ' ', 'p', 'h', 'i', 'l', 'i', 'p', 'p', 'i', 'n', 'e', 's', 0};
|
||||
char_type array2[len];
|
||||
std::char_traits<char_type>::copy(array2, array3, len);
|
||||
|
||||
VERIFY( str_lit1[0] == 'm' );
|
||||
c1 = array2[0];
|
||||
c2 = str_lit1[0];
|
||||
short c3 = array2[1];
|
||||
short c4 = str_lit1[1];
|
||||
std::char_traits<short>::move(array2, str_lit1, 0);
|
||||
char_type c3 = array2[1];
|
||||
char_type c4 = str_lit1[1];
|
||||
std::char_traits<char_type>::move(array2, str_lit1, 0);
|
||||
VERIFY( array2[0] == c1 );
|
||||
VERIFY( str_lit1[0] == c2 );
|
||||
std::char_traits<short>::move(array2, str_lit1, 1);
|
||||
std::char_traits<char_type>::move(array2, str_lit1, 1);
|
||||
VERIFY( array2[0] == c2 );
|
||||
VERIFY( str_lit1[0] == c2 );
|
||||
VERIFY( array2[1] == c3 );
|
||||
VERIFY( str_lit1[1] == c4 );
|
||||
std::char_traits<short>::move(array2, str_lit1, 2);
|
||||
std::char_traits<char_type>::move(array2, str_lit1, 2);
|
||||
VERIFY( array2[0] == c2 );
|
||||
VERIFY( str_lit1[0] == c2 );
|
||||
VERIFY( array2[1] == c4 );
|
||||
VERIFY( str_lit1[1] == c4 );
|
||||
|
||||
short* pc1 = array1 + 1;
|
||||
char_type* pc1 = array1 + 1;
|
||||
c1 = pc1[0];
|
||||
c2 = array1[0];
|
||||
VERIFY( c1 != c2 );
|
||||
short* pc2 = std::char_traits<short>::move(array1, pc1, 0);
|
||||
char_type* pc2 = std::char_traits<char_type>::move(array1, pc1, 0);
|
||||
c3 = pc1[0];
|
||||
c4 = array1[0];
|
||||
VERIFY( c1 == c3 );
|
||||
|
@ -114,11 +115,11 @@ void test02(void)
|
|||
|
||||
c1 = pc1[0];
|
||||
c2 = array1[0];
|
||||
short* pc3 = pc1;
|
||||
pc2 = std::char_traits<short>::move(array1, pc1, 10);
|
||||
char_type* pc3 = pc1;
|
||||
pc2 = std::char_traits<char_type>::move(array1, pc1, 10);
|
||||
c3 = pc1[0];
|
||||
c4 = array1[0];
|
||||
VERIFY( c1 != c3 ); // underlying short array changed.
|
||||
VERIFY( c1 != c3 ); // underlying char_type array changed.
|
||||
VERIFY( c4 != c3 );
|
||||
VERIFY( pc2 == array1 );
|
||||
VERIFY( pc3 == pc1 ); // but pointers o-tay
|
||||
|
@ -126,49 +127,47 @@ void test02(void)
|
|||
c2 = array1[0];
|
||||
VERIFY( c1 != c2 );
|
||||
|
||||
// size_t X::length(const short* p)
|
||||
len = std::char_traits<short>::length(str_lit1);
|
||||
VERIFY( len == sizeof(str_lit1) / sizeof(short) - 1 );
|
||||
// size_t X::length(const char_type* p)
|
||||
len = std::char_traits<char_type>::length(str_lit1);
|
||||
VERIFY( len == sizeof(str_lit1) / sizeof(char_type) - 1 );
|
||||
|
||||
// const short* X::find(const short* s, size_t n, short c)
|
||||
const int N4 = sizeof(str_lit1) / sizeof(short);
|
||||
const short* pc4 = std::char_traits<short>::find(str_lit1, N4, 'a');
|
||||
// const char_type* X::find(const char_type* s, size_t n, char_type c)
|
||||
const int N4 = sizeof(str_lit1) / sizeof(char_type);
|
||||
const char_type* pc4 = std::char_traits<char_type>::find(str_lit1, N4, 'a');
|
||||
VERIFY( pc4 != 0 );
|
||||
VERIFY( *pc4 == 'a' );
|
||||
|
||||
pc4 = std::char_traits<short>::find(str_lit1, N4, 0x0a73);
|
||||
pc4 = std::char_traits<char_type>::find(str_lit1, N4, 0x0a73);
|
||||
VERIFY( pc4 == 0 );
|
||||
|
||||
// short* X::assign(short* s, size_t n, short c)
|
||||
len = sizeof(array2) / sizeof(short);
|
||||
std::memset(array2, 0xaf, len * sizeof(short));
|
||||
// char_type* X::assign(char_type* s, size_t n, char_type c)
|
||||
len = sizeof(array2) / sizeof(char_type);
|
||||
std::memset(array2, 0xaf, len * sizeof(char_type));
|
||||
VERIFY( array2[0] != 0x15a8 );
|
||||
|
||||
pc1 = std::char_traits<short>::assign (array2, len, 0x15a8);
|
||||
pc1 = std::char_traits<char_type>::assign (array2, len, 0x15a8);
|
||||
VERIFY( pc1 == array2 );
|
||||
for (int i = 0; i < len; ++i)
|
||||
VERIFY( array2[i] == 0x15a8 );
|
||||
|
||||
// short* X::copy(short* s, const short* p, size_t n)
|
||||
int n1 = sizeof(str_lit1) / sizeof(short);
|
||||
pc1 = std::char_traits<short>::copy(array2, str_lit1, n1);
|
||||
len = std::char_traits<short>::length(array2);
|
||||
// char_type* X::copy(char_type* s, const char_type* p, size_t n)
|
||||
int n1 = sizeof(str_lit1) / sizeof(char_type);
|
||||
pc1 = std::char_traits<char_type>::copy(array2, str_lit1, n1);
|
||||
len = std::char_traits<char_type>::length(array2);
|
||||
VERIFY( len == n1 - 1 );
|
||||
for (int i = 0; i < len; ++i)
|
||||
VERIFY( str_lit1[i] == array2[i] );
|
||||
|
||||
// int X::compare(const short* p, const short* q, size_t n)
|
||||
const short* pconst1 = str_01.data();
|
||||
const short* pconst2 = str_lit1;
|
||||
// int X::compare(const char_type* p, const char_type* q, size_t n)
|
||||
const char_type* pconst1 = str_01.data();
|
||||
const char_type* pconst2 = str_lit1;
|
||||
|
||||
VERIFY( std::char_traits<short>::compare(pconst1, pconst2, 10) > 0 );
|
||||
VERIFY( std::char_traits<short>::compare(pconst2, pconst1, 10) < 0 );
|
||||
VERIFY( std::char_traits<short>::compare(pconst1, pconst1, 10) == 0 );
|
||||
VERIFY( std::char_traits<short>::compare(pconst2, pconst2, 10) == 0 );
|
||||
VERIFY( std::char_traits<char_type>::compare(pconst1, pconst2, 10) > 0 );
|
||||
VERIFY( std::char_traits<char_type>::compare(pconst2, pconst1, 10) < 0 );
|
||||
VERIFY( std::char_traits<char_type>::compare(pconst1, pconst1, 10) == 0 );
|
||||
VERIFY( std::char_traits<char_type>::compare(pconst2, pconst2, 10) == 0 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
test02();
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// { dg-do compile }
|
||||
// { dg-options "-ansi -pedantic-errors" }
|
||||
// 2001-02-11 gdr
|
||||
// Origin: Craig Rodrigues <rodrigc@mediaone.net>
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
using __gnu_test::test_container;
|
||||
using __gnu_test::random_access_iterator_wrapper;
|
||||
using std::nth_element;
|
||||
using std::partial_sort;
|
||||
|
||||
typedef test_container<int, random_access_iterator_wrapper> Container;
|
||||
|
||||
|
|
|
@ -52,12 +52,15 @@ lexstep(int* start, int length)
|
|||
return !carry;
|
||||
}
|
||||
|
||||
using __gnu_test::test_container;
|
||||
using __gnu_test::random_access_iterator_wrapper;
|
||||
using __gnu_test::bidirectional_iterator_wrapper;
|
||||
using __gnu_test::forward_iterator_wrapper;
|
||||
int main()
|
||||
{
|
||||
using __gnu_test::test_container;
|
||||
using __gnu_test::random_access_iterator_wrapper;
|
||||
using __gnu_test::bidirectional_iterator_wrapper;
|
||||
using __gnu_test::forward_iterator_wrapper;
|
||||
|
||||
using std::search_n;
|
||||
|
||||
int main() {
|
||||
test_container<int,forward_iterator_wrapper> con(array1,array1 + 10);
|
||||
VERIFY(search_n(con.end(), con.end(), 0, 1) == con.end());
|
||||
VERIFY(search_n(con.end(), con.end(), 1, 1) == con.end());
|
||||
|
|
|
@ -171,13 +171,6 @@ proc libstdc++_init { testfile } {
|
|||
set compiler [transform "g++"]
|
||||
}
|
||||
|
||||
# Default settings.
|
||||
set cxx [transform "g++"]
|
||||
set cxxflags "-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0"
|
||||
set cxxldflags ""
|
||||
set cc [transform "gcc"]
|
||||
# Locate testsuite_hooks.h and other testsuite headers.
|
||||
set includes "-I${srcdir}/util"
|
||||
# Adapt the defaults for special circumstances.
|
||||
if [is_remote host] {
|
||||
# A remote host does not, in general, have access to the
|
||||
|
@ -206,6 +199,12 @@ proc libstdc++_init { testfile } {
|
|||
return "untested"
|
||||
}
|
||||
}
|
||||
# Default settings.
|
||||
set cxx [transform "g++"]
|
||||
set cxxflags "-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0 "
|
||||
set cxxldflags ""
|
||||
set cc [transform "gcc"]
|
||||
# Locate testsuite_hooks.h and other testsuite headers.
|
||||
set includes "-Iutil"
|
||||
} elseif { [file exists $flags_file] } {
|
||||
# If we find a testsuite_flags file, we're testing in the build dir.
|
||||
|
@ -215,6 +214,9 @@ proc libstdc++_init { testfile } {
|
|||
set cc [exec sh $flags_file --build-cc]
|
||||
set includes [exec sh $flags_file --build-includes]
|
||||
}
|
||||
append cxxflags " "
|
||||
append cxxflags [getenv CXXFLAGS]
|
||||
v3track cxxflags 2
|
||||
|
||||
# Always use MO files built by this test harness.
|
||||
set cxxflags "$cxxflags -DLOCALEDIR=\".\""
|
||||
|
@ -830,7 +832,6 @@ proc check_v3_target_namedlocale { } {
|
|||
proc check_v3_target_debug_mode { } {
|
||||
global cxxflags
|
||||
global et_debug_mode
|
||||
|
||||
global tool
|
||||
|
||||
if { ![info exists et_debug_mode_target_name] } {
|
||||
|
|
|
@ -29,24 +29,5 @@ namespace tr1 {
|
|||
// [6.3.3] Hash function base template
|
||||
template <class T> struct hash;
|
||||
|
||||
// Hash function specializations
|
||||
template <> struct hash<bool>;
|
||||
template <> struct hash<char>;
|
||||
template <> struct hash<signed char>;
|
||||
template <> struct hash<unsigned char>;
|
||||
template <> struct hash<wchar_t>;
|
||||
template <> struct hash<short>;
|
||||
template <> struct hash<unsigned short>;
|
||||
template <> struct hash<int>;
|
||||
template <> struct hash<unsigned int>;
|
||||
template <> struct hash<long>;
|
||||
template <> struct hash<unsigned long>;
|
||||
template <> struct hash<float>;
|
||||
template <> struct hash<double>;
|
||||
template <> struct hash<long double>;
|
||||
template<class T> struct hash<T*>;
|
||||
template <> struct hash<std::string>;
|
||||
template <> struct hash<std::wstring>;
|
||||
|
||||
} // namespace tr1
|
||||
} // namespace std
|
||||
|
|
Loading…
Reference in New Issue