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.bout...@murex.com> Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/af17dead Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/af17dead Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/af17dead Branch: refs/heads/master Commit: af17dead2e31364d6741833c2884f83ae78663f8 Parents: cca892e Author: aboutros <adel.bout...@murex.com> Authored: Fri Oct 7 15:03:59 2016 +0200 Committer: Alan Conway <acon...@redhat.com> Committed: Thu Oct 20 08:13:52 2016 -0400 ---------------------------------------------------------------------- proton-c/bindings/cpp/src/value_test.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/af17dead/proton-c/bindings/cpp/src/value_test.cpp ---------------------------------------------------------------------- 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 @@ template <class T> void sequence_test( 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); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org