[LLVMdev] API design (and Boost and tr1)

Chris Lattner sabre at nondot.org
Wed Jul 4 13:46:52 PDT 2007


On Wed, 4 Jul 2007, David A. Greene wrote:
> I have to think about this a bit but one complication is that clients aren't
> always using std-like containers.  There are several places that look like
> this:
>
>   Value *array = { v1, v2, v3, v4};
>   blah = new CallInst(...,&array[0], 4,...);
>
> Since array doesn't have begin/end members we'd need some kind of
> specialization for that case.  Iterators nicely avoid this issue.

We should just keep the existing constructor, so this isn't a problem. 
These clients don't have the "dereference end" problem.

-Chris

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



More information about the llvm-dev mailing list