PROTON-1312: c++ Sunstudio does not compile "++vector.begin()"

Error message:"Operand for operator "++" must be an lvalue.". We used a local
variable to bypass that.

Signed-off-by: aboutros <adel.boutros@murex.com>
diff --git a/proton-c/bindings/cpp/src/value_test.cpp b/proton-c/bindings/cpp/src/value_test.cpp
index 596cc6b..d9f0f4a 100644
--- a/proton-c/bindings/cpp/src/value_test.cpp
+++ b/proton-c/bindings/cpp/src/value_test.cpp
@@ -55,7 +55,8 @@
     ASSERT_EQUAL(vx, v2);
 
     T y(x);
-    *y.begin() = *(++y.begin()); // Second element is bigger so y is lexicographically bigger than x
+    typename T::iterator it = y.begin();
+    *y.begin() = *(++it); // Second element is bigger so y is lexicographically bigger than x
     value vy(y);
     ASSERT(vx != vy);
     ASSERT(vx < vy);