Boost logo

Boost :

Subject: Re: [boost] [dynamic_bitset] intersects
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-03-08 15:08:36


AMDG

Joachim Faulhaber wrote:
> I think that the assumption of Vicente ...
>
> dynamic_bitset<> bs1, bs2;
> // ... expecting ...
> intersetcs(bs1, bs2)?
>
> is kind of justified, because function intersects could be implemented
> not only by memberfunctions of dynamic_bitset but even with non member
> functions, in more than one way,
>
> e.g.
> bool intersects(const dynamic_bitset<Block, Allocator>& a,
> const dynamic_bitset<Block, Allocator>& b)
> // nonmembers & and member empty()
> { return !(a & b).empty(); }
>
>
> this would be consistent with the coding standard to keep class
> interfaces minimal and to implement namespace global functions
> on the bases of class memberfunctions where ever this is possible.
>

This would be less efficient because of the temporary.

In Christ,
Steven Watanabe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk