From 7c9201514989cce06b05850f55f3bcd0e3d5e18b Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 2 Feb 2004 16:35:09 +0000 Subject: [PATCH] stl_function.h: Additional minor tweaks. 2004-02-02 Paolo Carlini * include/bits/stl_function.h: Additional minor tweaks. * include/bits/stl_multiset.h: Likewise. * include/bits/stl_queue.h: Minor tweaks. From-SVN: r77125 --- libstdc++-v3/ChangeLog | 7 +++ libstdc++-v3/include/bits/stl_function.h | 62 ++++++++++++++++-------- libstdc++-v3/include/bits/stl_multiset.h | 5 +- libstdc++-v3/include/bits/stl_queue.h | 24 ++++----- 4 files changed, 64 insertions(+), 34 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 0eb760475da..76a70940144 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2004-02-02 Paolo Carlini + + * 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 PR libstdc++/13976 (continued) diff --git a/libstdc++-v3/include/bits/stl_function.h b/libstdc++-v3/include/bits/stl_function.h index e9ee842ce37..fed4124661a 100644 --- a/libstdc++-v3/include/bits/stl_function.h +++ b/libstdc++-v3/include/bits/stl_function.h @@ -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 { 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 { 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 : 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 : public unary_function { 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 : 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 : 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 : 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 { 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 diff --git a/libstdc++-v3/include/bits/stl_multiset.h b/libstdc++-v3/include/bits/stl_multiset.h index f085a0059cc..5a8b29f0b87 100644 --- a/libstdc++-v3/include/bits/stl_multiset.h +++ b/libstdc++-v3/include/bits/stl_multiset.h @@ -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) { } /** diff --git a/libstdc++-v3/include/bits/stl_queue.h b/libstdc++-v3/include/bits/stl_queue.h index 441fc55ef4b..529b87641a6 100644 --- a/libstdc++-v3/include/bits/stl_queue.h +++ b/libstdc++-v3/include/bits/stl_queue.h @@ -1,6 +1,6 @@ // 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 - friend bool - operator==(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&); + template + friend bool + operator==(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&); template 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 _Compare = less > + typename _Compare = less > 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; -- 2.30.2