Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieu@hoang.co.uk>2013-05-31 18:08:37 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-05-31 18:08:37 +0400
commitf2064fee26de61388898d0622b4a5a00144e2781 (patch)
tree5ea54acdd5a88d2dc3aabe6952d706db8a5c49f8
parent7fc87f46a942cf837bb9cf91e3e31c40caa00920 (diff)
parenta1990c77d3b79019c3f3e4c2332b2f274f2741a3 (diff)
Merge branch 'master' of github.com:moses-smt/mosesdecoder
-rw-r--r--util/sized_iterator.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/util/sized_iterator.hh b/util/sized_iterator.hh
index cf998953b..88ca174e6 100644
--- a/util/sized_iterator.hh
+++ b/util/sized_iterator.hh
@@ -63,6 +63,13 @@ class SizedProxy {
const void *Data() const { return inner_.Data(); }
void *Data() { return inner_.Data(); }
+
+ friend void swap(SizedProxy &first, SizedProxy &second) {
+ std::swap_ranges(
+ static_cast<char*>(first.inner_.Data()),
+ static_cast<char*>(first.inner_.Data()) + first.inner_.EntrySize(),
+ static_cast<char*>(second.inner_.Data()));
+ }
friend void swap(SizedProxy &first, SizedProxy &second) {
std::swap_ranges(