[LLVMdev] set_intersect and Visual C compiler

Chris Lattner sabre at nondot.org
Wed Oct 13 08:31:49 PDT 2004


On Wed, 13 Oct 2004, Paolo Invernizzi wrote:

> template <class S1Ty, class S2Ty>
> void set_intersect(S1Ty &S1, const S2Ty &S2) {
>    for (typename S1Ty::iterator I = S1.begin(); I != S1.end();) {
>      const S1Ty::key_type &E = *I;
>      ++I;
>      if (!S2.count(E)) S1.erase(E);   // Erase element if not in S2
>    }
> }

I applied this one, and also the SetVector patch:

http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041011/019258.html
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041011/019259.html

Thanks guys!

-Chris

-- 
http://llvm.org/
http://nondot.org/sabre/




More information about the llvm-dev mailing list