forward input sketch
diff --git a/theta/include/theta_union.hpp b/theta/include/theta_union.hpp
index 74716e0..44f9b52 100644
--- a/theta/include/theta_union.hpp
+++ b/theta/include/theta_union.hpp
@@ -50,7 +50,8 @@
* This method is to update the union with a given sketch
* @param sketch to update the union with
*/
- void update(const Sketch& sketch);
+ template<typename FwdSketch>
+ void update(FwdSketch&& sketch);
/**
* This method produces a copy of the current state of the union as a compact sketch.
diff --git a/theta/include/theta_union_impl.hpp b/theta/include/theta_union_impl.hpp
index 88de353..4708d70 100644
--- a/theta/include/theta_union_impl.hpp
+++ b/theta/include/theta_union_impl.hpp
@@ -28,8 +28,9 @@
{}
template<typename A>
-void theta_union_alloc<A>::update(const Sketch& sketch) {
- state_.update(sketch);
+template<typename SS>
+void theta_union_alloc<A>::update(SS&& sketch) {
+ state_.update(std::forward<SS>(sketch));
}
template<typename A>