[uClibc-cvs] CVS uClibc++/include
CVS User gkajmowi
gkajmowi at codepoet.org
Thu Jan 6 18:03:06 UTC 2005
Update of /var/cvs/uClibc++/include
In directory nail:/tmp/cvs-serv4981/include
Modified Files:
ios list map set utility
Log Message:
Miscellaneous changes to list, map, utility as well as the test suite.
--- /var/cvs/uClibc++/include/ios 2005/01/06 00:03:06 1.10
+++ /var/cvs/uClibc++/include/ios 2005/01/06 18:03:05 1.11
@@ -336,7 +336,7 @@
iostate exceptions() const;
void exceptions(iostate except);
- explicit basic_ios(basic_streambuf<charT,traits>* sb) : mtied(0), mstreambuf(0){
+ explicit basic_ios(basic_streambuf<charT,traits>* sb) : fill_char(' '), mtied(0), mstreambuf(0){
init(sb);
}
virtual ~basic_ios(){
@@ -361,9 +361,13 @@
}
basic_ios& copyfmt(const basic_ios& rhs);
char_type fill() const{
- return widen(' ');
+ return fill_char;
+ }
+ char_type fill(char_type ch){
+ char_type temp = fill_char;
+ fill_char = ch;
+ return temp;
}
- char_type fill(char_type ch);
locale imbue(const locale& loc);
@@ -373,6 +377,7 @@
return c;
}
protected:
+ char_type fill_char;
basic_ostream<charT,traits>* mtied;
basic_streambuf<charT,traits>* mstreambuf;
basic_ios() : mtied(0), mstreambuf(0){ }
--- /var/cvs/uClibc++/include/list 2005/01/03 16:28:46 1.7
+++ /var/cvs/uClibc++/include/list 2005/01/06 18:03:05 1.8
@@ -61,7 +61,19 @@
list(const list<T,Allocator>& x);
~list();
- list<T,Allocator>& operator=(const list<T,Allocator>& x);
+ list<T,Allocator>& operator=(const list<T,Allocator>& x){
+ if(&x == this){
+ return *this;
+ }
+ clear();
+ iterator i = x.begin();
+ while(i != x.end()){
+ push_back(*i);
+ ++i;
+ }
+ return *this;
+ }
+
template <class InputIterator> void assign(InputIterator first, InputIterator last);
template <class Size, class U> void assign(Size n, const U& u = U());
allocator_type get_allocator() const;
--- /var/cvs/uClibc++/include/map 2005/01/06 00:03:06 1.7
+++ /var/cvs/uClibc++/include/map 2005/01/06 18:03:05 1.8
@@ -208,7 +208,7 @@
: element(e), container(c) { }
~__map_citer() { }
- typename Map::value_type & operator*(){
+ typename Map::value_type operator*(){
return container->data[element];
}
const typename Map::value_type * operator->(){
--- /var/cvs/uClibc++/include/set 2005/01/06 00:03:06 1.5
+++ /var/cvs/uClibc++/include/set 2005/01/06 18:03:05 1.6
@@ -206,7 +206,7 @@
: element(e), container(c) { }
~__set_citer() { }
- typename Set::value_type & operator*(){
+ typename Set::value_type operator*(){
return container->data[element];
}
const typename Set::value_type * operator->(){
--- /var/cvs/uClibc++/include/utility 2004/09/08 14:27:06 1.3
+++ /var/cvs/uClibc++/include/utility 2005/01/06 18:03:05 1.4
@@ -66,16 +66,24 @@
}
return false;
}
- template <class T1, class T2> bool operator< (const pair<T1,T2>&, const pair<T1,T2>&);
+ template <class T1, class T2> bool operator< (const pair<T1,T2>& x, const pair<T1,T2>& y){
+ return x.first < y.first || (!(y.first < x.first) && x.second < y.second);
+ }
template <class T1, class T2> bool operator!=(const pair<T1,T2>& x, const pair<T1,T2>& y){
if(x.first != y.first || x.second != y.second){
return true;
}
return false;
}
- template <class T1, class T2> bool operator> (const pair<T1,T2>&, const pair<T1,T2>&);
- template <class T1, class T2> bool operator>=(const pair<T1,T2>&, const pair<T1,T2>&);
- template <class T1, class T2> bool operator<=(const pair<T1,T2>&, const pair<T1,T2>&);
+ template <class T1, class T2> bool operator> (const pair<T1,T2>& x, const pair<T1,T2>& y){
+ return x.first > y.first || (!(y.first > x.first) && x.second > y.second);
+ }
+ template <class T1, class T2> bool operator>=(const pair<T1,T2>& x, const pair<T1,T2>& y){
+ return x.first >= y.first || (!(y.first >= x.first) && x.second >= y.second);
+ }
+ template <class T1, class T2> bool operator<=(const pair<T1,T2>& x, const pair<T1,T2>& y){
+ return x.first <= y.first || (!(y.first <= x.first) && x.second <= y.second);
+ }
template <class T1, class T2> pair<T1,T2> make_pair(const T1& x, const T2& y){
return pair<T1,T2>(x, y);
}
More information about the uClibc-cvs
mailing list