add iterator range version of ctor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34899 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-03-04 04:04:43 +00:00
parent 9f3d738866
commit ab8fea5283

View File

@ -209,6 +209,13 @@ class SmallPtrSet : public SmallPtrSetImpl {
public:
SmallPtrSet() : SmallPtrSetImpl(NextPowerOfTwo<SmallSizePowTwo>::Val) {}
template<typename It>
SmallPtrSet(It I, It E)
: SmallPtrSetImpl(NextPowerOfTwo<SmallSizePowTwo>::Val) {
for (; I != E; ++I)
insert(*I);
}
typedef SmallPtrSetIterator<PtrType> iterator;
typedef SmallPtrSetIterator<PtrType> const_iterator;
inline iterator begin() const {