summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-11 02:55:42 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-08-11 02:55:42 +0000
commit48293abe985fba85c456cce20c12477d460ce0e3 (patch)
tree8a892f696e7cfc62cc6832a04efe2d6b3f1e5667
parentf56aab928165dc6b4a82dbc06bfa6f5d42cca4fc (diff)
sparse vector ::swap
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@513 ec762483-ff6d-05da-a07a-a48fb63a330f
-rw-r--r--utils/sparse_vector.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/sparse_vector.h b/utils/sparse_vector.h
index 207489c5..e8e9c2f7 100644
--- a/utils/sparse_vector.h
+++ b/utils/sparse_vector.h
@@ -412,6 +412,11 @@ private:
MapType values_;
};
+template <class T>
+inline void swap(SparseVector<T> &a,SparseVector<T> &b) {
+ a.swap(b);
+}
+
//like a pair but can live in a union, because it lacks default+copy ctors, dtor.
template <class T>
struct feature_val {