Commit 7c920151 by Paolo Carlini Committed by Paolo Carlini

stl_function.h: Additional minor tweaks.

2004-02-02  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/stl_function.h: Additional minor tweaks.
	* include/bits/stl_multiset.h: Likewise.

	* include/bits/stl_queue.h: Minor tweaks.

From-SVN: r77125
parent 238b11b5
2004-02-02 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_function.h: Additional minor tweaks.
* include/bits/stl_multiset.h: Likewise.
* include/bits/stl_queue.h: Minor tweaks.
2004-02-02 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/13976 (continued)
* include/ext/malloc_allocator.h (malloc_allocator::deallocate):
Make the second parameter unnamed, to void unused parameter
......
......@@ -315,7 +315,8 @@ namespace std
protected:
_Predicate _M_pred;
public:
explicit unary_negate(const _Predicate& __x) : _M_pred(__x) {}
explicit
unary_negate(const _Predicate& __x) : _M_pred(__x) {}
bool
operator()(const typename _Predicate::argument_type& __x) const
......@@ -338,7 +339,8 @@ namespace std
protected:
_Predicate _M_pred;
public:
explicit binary_negate(const _Predicate& __x)
explicit
binary_negate(const _Predicate& __x)
: _M_pred(__x) { }
bool
......@@ -483,7 +485,8 @@ namespace std
public:
pointer_to_unary_function() {}
explicit pointer_to_unary_function(_Result (*__x)(_Arg))
explicit
pointer_to_unary_function(_Result (*__x)(_Arg))
: _M_ptr(__x) {}
_Result
......@@ -507,7 +510,8 @@ namespace std
public:
pointer_to_binary_function() {}
explicit pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2))
explicit
pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2))
: _M_ptr(__x) {}
_Result
......@@ -587,7 +591,8 @@ namespace std
class mem_fun_t : public unary_function<_Tp*, _Ret>
{
public:
explicit mem_fun_t(_Ret (_Tp::*__pf)())
explicit
mem_fun_t(_Ret (_Tp::*__pf)())
: _M_f(__pf) {}
_Ret
......@@ -602,7 +607,8 @@ namespace std
class const_mem_fun_t : public unary_function<const _Tp*, _Ret>
{
public:
explicit const_mem_fun_t(_Ret (_Tp::*__pf)() const)
explicit
const_mem_fun_t(_Ret (_Tp::*__pf)() const)
: _M_f(__pf) {}
_Ret
......@@ -617,7 +623,8 @@ namespace std
class mem_fun_ref_t : public unary_function<_Tp, _Ret>
{
public:
explicit mem_fun_ref_t(_Ret (_Tp::*__pf)())
explicit
mem_fun_ref_t(_Ret (_Tp::*__pf)())
: _M_f(__pf) {}
_Ret
......@@ -632,7 +639,8 @@ namespace std
class const_mem_fun_ref_t : public unary_function<_Tp, _Ret>
{
public:
explicit const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const)
explicit
const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const)
: _M_f(__pf) {}
_Ret
......@@ -647,7 +655,8 @@ namespace std
class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret>
{
public:
explicit mem_fun1_t(_Ret (_Tp::*__pf)(_Arg))
explicit
mem_fun1_t(_Ret (_Tp::*__pf)(_Arg))
: _M_f(__pf) {}
_Ret
......@@ -662,7 +671,8 @@ namespace std
class const_mem_fun1_t : public binary_function<const _Tp*, _Arg, _Ret>
{
public:
explicit const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const)
explicit
const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const)
: _M_f(__pf) {}
_Ret
......@@ -677,7 +687,8 @@ namespace std
class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
{
public:
explicit mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg))
explicit
mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg))
: _M_f(__pf) {}
_Ret
......@@ -692,7 +703,8 @@ namespace std
class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
{
public:
explicit const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const)
explicit
const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const)
: _M_f(__pf) {}
_Ret
......@@ -707,7 +719,8 @@ namespace std
class mem_fun_t<void, _Tp> : public unary_function<_Tp*, void>
{
public:
explicit mem_fun_t(void (_Tp::*__pf)())
explicit
mem_fun_t(void (_Tp::*__pf)())
: _M_f(__pf) {}
void
......@@ -722,7 +735,8 @@ namespace std
class const_mem_fun_t<void, _Tp> : public unary_function<const _Tp*, void>
{
public:
explicit const_mem_fun_t(void (_Tp::*__pf)() const)
explicit
const_mem_fun_t(void (_Tp::*__pf)() const)
: _M_f(__pf) {}
void
......@@ -737,7 +751,8 @@ namespace std
class mem_fun_ref_t<void, _Tp> : public unary_function<_Tp, void>
{
public:
explicit mem_fun_ref_t(void (_Tp::*__pf)())
explicit
mem_fun_ref_t(void (_Tp::*__pf)())
: _M_f(__pf) {}
void
......@@ -752,7 +767,8 @@ namespace std
class const_mem_fun_ref_t<void, _Tp> : public unary_function<_Tp, void>
{
public:
explicit const_mem_fun_ref_t(void (_Tp::*__pf)() const)
explicit
const_mem_fun_ref_t(void (_Tp::*__pf)() const)
: _M_f(__pf) {}
void
......@@ -767,7 +783,8 @@ namespace std
class mem_fun1_t<void, _Tp, _Arg> : public binary_function<_Tp*, _Arg, void>
{
public:
explicit mem_fun1_t(void (_Tp::*__pf)(_Arg))
explicit
mem_fun1_t(void (_Tp::*__pf)(_Arg))
: _M_f(__pf) {}
void
......@@ -783,8 +800,9 @@ namespace std
: public binary_function<const _Tp*, _Arg, void>
{
public:
explicit const_mem_fun1_t(void (_Tp::*__pf)(_Arg) const)
: _M_f(__pf) {}
explicit
const_mem_fun1_t(void (_Tp::*__pf)(_Arg) const)
: _M_f(__pf) {}
void
operator()(const _Tp* __p, _Arg __x) const
......@@ -799,7 +817,8 @@ namespace std
: public binary_function<_Tp, _Arg, void>
{
public:
explicit mem_fun1_ref_t(void (_Tp::*__pf)(_Arg))
explicit
mem_fun1_ref_t(void (_Tp::*__pf)(_Arg))
: _M_f(__pf) {}
void
......@@ -815,7 +834,8 @@ namespace std
: public binary_function<_Tp, _Arg, void>
{
public:
explicit const_mem_fun1_ref_t(void (_Tp::*__pf)(_Arg) const)
explicit
const_mem_fun1_ref_t(void (_Tp::*__pf)(_Arg) const)
: _M_f(__pf) {}
void
......
......@@ -144,8 +144,9 @@ namespace __gnu_norm
multiset()
: _M_t(_Compare(), allocator_type()) { }
explicit multiset(const _Compare& __comp,
const allocator_type& __a = allocator_type())
explicit
multiset(const _Compare& __comp,
const allocator_type& __a = allocator_type())
: _M_t(__comp, __a) { }
/**
......
// Queue implementation -*- C++ -*-
// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
// Copyright (C) 2001, 2002, 2003, 2004 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
......@@ -112,9 +112,9 @@ namespace std
__glibcxx_class_requires(_Sequence, _BackInsertionSequenceConcept)
__glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
template<typename _Tp1, typename _Seq1>
friend bool
operator==(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&);
template<typename _Tp1, typename _Seq1>
friend bool
operator==(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&);
template<typename _Tp1, typename _Seq1>
friend bool
......@@ -149,11 +149,13 @@ namespace std
* Returns true if the %queue is empty.
*/
bool
empty() const { return c.empty(); }
empty() const
{ return c.empty(); }
/** Returns the number of elements in the %queue. */
size_type
size() const { return c.size(); }
size() const
{ return c.size(); }
/**
* Returns a read/write reference to the data at the first
......@@ -209,7 +211,8 @@ namespace std
* underlying sequence.
*/
void
push(const value_type& __x) { c.push_back(__x); }
push(const value_type& __x)
{ c.push_back(__x); }
/**
* @brief Removes first element.
......@@ -292,8 +295,7 @@ namespace std
operator>=(const queue<_Tp,_Sequence>& __x,
const queue<_Tp,_Sequence>& __y)
{ return !(__x < __y); }
/**
* @brief A standard container automatically sorting its contents.
*
......@@ -333,7 +335,7 @@ namespace std
* the elements for you. (How could it know to do so?)
*/
template<typename _Tp, typename _Sequence = vector<_Tp>,
typename _Compare = less<typename _Sequence::value_type> >
typename _Compare = less<typename _Sequence::value_type> >
class priority_queue
{
// concept requirements
......@@ -344,7 +346,7 @@ namespace std
__glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
__glibcxx_class_requires4(_Compare, bool, _Tp,_Tp,_BinaryFunctionConcept)
public:
public:
typedef typename _Sequence::value_type value_type;
typedef typename _Sequence::reference reference;
typedef typename _Sequence::const_reference const_reference;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment