[ Date Prev][ Date Next][ Thread Prev][ Thread Next][ Date Index][ Thread Index]
Re: [vsipl++] PATCH: work-around for ghs
- To: VSIPL++ Developers List <vsipl++@xxxxxxxxxxxxxxxx>
- Subject: Re: [vsipl++] PATCH: work-around for ghs
- From: Stefan Seefeld <stefan@xxxxxxxxxxxxxxxx>
- Date: Thu, 10 Nov 2005 22:48:02 -0500
Mark Mitchell wrote:
Stefan Seefeld wrote:
VSIP_IMPL_ASSIGN_OP_NOFWD(&=, &) // Use the NOFWD variant or else
VSIP_IMPL_ASSIGN_OP_NOFWD(|=, |) // ghs will be confused
VSIP_IMPL_ASSIGN_OP_NOFWD(^=, ^)
For this kind of patch, you need to add more comments.
Fair enough. Here is a new, more descriptive patch.
Regards,
Stefan
Index: src/vsip/vector.hpp
===================================================================
RCS file: /home/cvs/Repository/vpp/src/vsip/vector.hpp,v
retrieving revision 1.34
diff -u -r1.34 vector.hpp
--- src/vsip/vector.hpp 2 Nov 2005 18:44:03 -0000 1.34
+++ src/vsip/vector.hpp 11 Nov 2005 03:46:03 -0000
@@ -262,9 +262,12 @@
VSIP_IMPL_ASSIGN_OP(-=, -)
VSIP_IMPL_ASSIGN_OP(*=, *)
VSIP_IMPL_ASSIGN_OP(/=, /)
- VSIP_IMPL_ASSIGN_OP(&=, &)
- VSIP_IMPL_ASSIGN_OP(|=, |)
- VSIP_IMPL_ASSIGN_OP_NOFWD(^=, ^) // Remove NOFWD when operator^ implented
+ // ghs claims the use of operator& in 'view1 & view2' is ambiguous,
+ // thus we implement operator&= in terms of the scalar operator&.
+ // Likewise for operator=| and operator=^.
+ VSIP_IMPL_ASSIGN_OP_NOFWD(&=, &)
+ VSIP_IMPL_ASSIGN_OP_NOFWD(|=, |)
+ VSIP_IMPL_ASSIGN_OP_NOFWD(^=, ^)
};
|