--- a/gecode/set/int/weights.hpp
+++ b/gecode/set/int/weights.hpp
@@ -49,9 +49,9 @@
     /// The value iterator
     I iter;
     /// A superset of the elements found in the iterator
-    const SharedArray<int> elements;
+    SharedArray<int> elements;
     /// Weights for all the possible elements
-    const SharedArray<int> weights;
+    SharedArray<int> weights;
     /// The current index into the elements and weights
     int index;
     /// Move to the next element
