On Sep 10, 2007, at 6:38 PM, Daniel Berlin wrote:

> +// Convenience functions to allow Or and And without dereferencing  
> in the user
> +// code.

It is generally bad form to overload operators like this.  Usually  
having the extra dereference is a good thing from the consistency and  
"magic reduction" standpoint.  Do you really need these?

-Chris

> +template <unsigned ElementSize>
> +inline void operator |=(SparseBitVector<ElementSize> *LHS,
> +                        const SparseBitVector<ElementSize> &RHS) {
> +  LHS->operator|=(RHS);
> +}
> +
> +template <unsigned ElementSize>
> +inline void operator |=(SparseBitVector<ElementSize> *LHS,
> +                        const SparseBitVector<ElementSize> *RHS) {
> +  LHS->operator|=(RHS);
> +}
> +
> +template <unsigned ElementSize>
> +inline void operator &=(SparseBitVector<ElementSize> *LHS,
> +                        const SparseBitVector<ElementSize> &RHS) {
> +  LHS->operator&=(RHS);
> +}
> +
> +template <unsigned ElementSize>
> +inline void operator &=(SparseBitVector<ElementSize> *LHS,
> +                        const SparseBitVector<ElementSize> *RHS) {

_______________________________________________
llvm-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to