[Debtags-commits] [svn] r869 - libtagcoll1/trunk/tagcoll
Enrico Zini
debtags-commits@lists.alioth.debian.org
Sun, 05 Jun 2005 23:56:47 +0000
Author: enrico
Date: Sun Jun 5 23:56:47 2005
New Revision: 869
Modified:
libtagcoll1/trunk/tagcoll/OpSet.cc
libtagcoll1/trunk/tagcoll/OpSet.h
Log:
Removed empty throw() declarations from OpSet methods
Modified: libtagcoll1/trunk/tagcoll/OpSet.cc
==============================================================================
--- libtagcoll1/trunk/tagcoll/OpSet.cc (original)
+++ libtagcoll1/trunk/tagcoll/OpSet.cc Sun Jun 5 23:56:47 2005
@@ -36,7 +36,7 @@
//template class OpSet<Debtags::Package*>;
template<class T>
-bool OpSet<T>::contains(const OpSet<T>& ts) const throw ()
+bool OpSet<T>::contains(const OpSet<T>& ts) const
{
typename OpSet<T>::const_iterator b = ts.begin();
@@ -52,7 +52,7 @@
}
template<class T>
-int OpSet<T>::distance(const OpSet<T>& ts) const throw ()
+int OpSet<T>::distance(const OpSet<T>& ts) const
{
int res = 0;
int intCount = 0;
@@ -82,7 +82,7 @@
}
template<class T>
-OpSet<T> OpSet<T>::operator+(const T& item) const throw ()
+OpSet<T> OpSet<T>::operator+(const T& item) const
{
OpSet<T> res = *this;
res.insert(item);
@@ -90,7 +90,7 @@
}
template<class T>
-OpSet<T> OpSet<T>::operator+(const OpSet<T>& ts) const throw ()
+OpSet<T> OpSet<T>::operator+(const OpSet<T>& ts) const
{
OpSet<T> res;
set_union(begin(), end(), ts.begin(), ts.end(), inserter(res, res.begin()));
@@ -98,7 +98,7 @@
}
template<class T>
-OpSet<T> OpSet<T>::operator-(const T& item) const throw ()
+OpSet<T> OpSet<T>::operator-(const T& item) const
{
OpSet<T> res = *this;
res.erase(item);
@@ -106,7 +106,7 @@
}
template<class T>
-OpSet<T> OpSet<T>::operator-(const OpSet<T>& ts) const throw ()
+OpSet<T> OpSet<T>::operator-(const OpSet<T>& ts) const
{
OpSet<T> res;
set_difference(begin(), end(), ts.begin(), ts.end(), inserter(res, res.begin()));
@@ -114,7 +114,7 @@
}
template<class T>
-OpSet<T> OpSet<T>::operator^(const OpSet<T>& ts) const throw ()
+OpSet<T> OpSet<T>::operator^(const OpSet<T>& ts) const
{
OpSet<T> res;
set_intersection(begin(), end(), ts.begin(), ts.end(), inserter(res, res.begin()));
@@ -122,14 +122,14 @@
}
template<class T>
-OpSet<T>& OpSet<T>::operator+=(const T& item) throw ()
+OpSet<T>& OpSet<T>::operator+=(const T& item)
{
insert(item);
return *this;
}
template<class T>
-OpSet<T>& OpSet<T>::operator+=(const OpSet<T>& ts) throw ()
+OpSet<T>& OpSet<T>::operator+=(const OpSet<T>& ts)
{
for (typename OpSet<T>::const_iterator t = ts.begin();
t != ts.end(); t++)
@@ -138,14 +138,14 @@
}
template<class T>
-OpSet<T>& OpSet<T>::operator-=(const T& item) throw ()
+OpSet<T>& OpSet<T>::operator-=(const T& item)
{
erase(item);
return *this;
}
template<class T>
-OpSet<T>& OpSet<T>::operator-=(const OpSet<T>& ts) throw ()
+OpSet<T>& OpSet<T>::operator-=(const OpSet<T>& ts)
{
for (typename OpSet<T>::const_iterator t = ts.begin();
t != ts.end(); t++)
@@ -154,7 +154,7 @@
}
template<class T>
-OpSet<T>& OpSet<T>::operator^=(const OpSet<T>& ts) throw ()
+OpSet<T>& OpSet<T>::operator^=(const OpSet<T>& ts)
{
(*this) = (*this) ^ ts;
return *this;
Modified: libtagcoll1/trunk/tagcoll/OpSet.h
==============================================================================
--- libtagcoll1/trunk/tagcoll/OpSet.h (original)
+++ libtagcoll1/trunk/tagcoll/OpSet.h Sun Jun 5 23:56:47 2005
@@ -62,77 +62,77 @@
using std::set<T>::end;
// Return true if the tag set contains tag, else false
- bool contains(const T& item) const throw () { return find(item) != end(); }
+ bool contains(const T& item) const { return find(item) != end(); }
// Return true if the tag set contains ts, else false
- bool contains(const OpSet<T>& ts) const throw ();
+ bool contains(const OpSet<T>& ts) const;
// Find the distance between two tagsets
// The distance between A and B is defined by infinity if the intersection
// between A and B is empty, else it is | (A + B) - (A ^ B) |
// That is, the cardinality of ((A <union> B) <difference> (A <intersection> B))
// Return -1 if the distance is infinity
- int distance(const OpSet<T>& ts) const throw ();
+ int distance(const OpSet<T>& ts) const;
/**
* Singleton union
* @return the set union of this set and the singleton set {tag}
*/
- OpSet<T> operator+(const T& tag) const throw ();
+ OpSet<T> operator+(const T& tag) const;
/**
* Singleton union
* @return the set union of this set and the singleton set {tag}
*/
- OpSet<T>& operator+=(const T& ts) throw ();
+ OpSet<T>& operator+=(const T& ts);
/**
* Set union
* @return the set union of this set and the set ts
*/
- OpSet<T> operator+(const OpSet<T>& ts) const throw ();
+ OpSet<T> operator+(const OpSet<T>& ts) const;
/**
* Singleton union
* @return the set union of this set and the singleton set {tag}
*/
- OpSet<T>& operator+=(const OpSet<T>& ts) throw ();
+ OpSet<T>& operator+=(const OpSet<T>& ts);
/**
* Singleton difference
* @return the set difference of this set and the singleton set {tag}
*/
- OpSet<T> operator-(const T& tag) const throw ();
+ OpSet<T> operator-(const T& tag) const;
/**
* Singleton difference
* @return the set difference of this set and the singleton set {tag}
*/
- OpSet<T>& operator-=(const T& tag) throw ();
+ OpSet<T>& operator-=(const T& tag);
/**
* Set difference
* @return the set difference of this set and the set ts
*/
- OpSet<T> operator-(const OpSet<T>& ts) const throw ();
+ OpSet<T> operator-(const OpSet<T>& ts) const;
/**
* Set difference
* @return the set difference of this set and the set ts
*/
- OpSet<T>& operator-=(const OpSet<T>& ts) throw ();
+ OpSet<T>& operator-=(const OpSet<T>& ts);
/**
* Set intersection
* @return the set intersection of this set and the set ts
*/
- OpSet<T> operator^(const OpSet<T>& ts) const throw ();
+ OpSet<T> operator^(const OpSet<T>& ts) const;
/**
* Set intersection
* @return the set intersection of this set and the set ts
*/
- OpSet<T>& operator^=(const OpSet<T>& ts) throw ();
+ OpSet<T>& operator^=(const OpSet<T>& ts);
};
};