Lines Matching defs:Ptr
149 std::pair<const void *const *, bool> insert_imp(const void *Ptr) {
155 if (Value == Ptr)
161 CurArray[NumNonEmpty++] = Ptr;
167 return insert_imp_big(Ptr);
174 bool erase_imp(const void * Ptr) {
178 if (*APtr == Ptr) {
187 auto *Bucket = doFind(Ptr);
201 /// slot which stores Ptr;
202 const void *const * find_imp(const void * Ptr) const {
208 if (*APtr == Ptr)
214 if (auto *Bucket = doFind(Ptr))
219 bool contains_imp(const void *Ptr) const {
225 if (*APtr == Ptr)
230 return doFind(Ptr) != nullptr;
236 std::pair<const void *const *, bool> insert_imp_big(const void *Ptr);
238 const void *const *doFind(const void *Ptr) const;
239 const void * const *FindBucketFor(const void *Ptr) const;
380 /// Inserts Ptr if and only if there is no element in the container equal to
381 /// Ptr. The bool component of the returned pair is true if and only if the
383 /// the element equal to Ptr.
384 std::pair<iterator, bool> insert(PtrType Ptr) {
385 auto p = insert_imp(PtrTraits::getAsVoidPointer(Ptr));
390 /// identical to calling insert(Ptr), but allows SmallPtrSet to be used by
392 iterator insert(iterator, PtrType Ptr) {
393 return insert(Ptr).first;
401 bool erase(PtrType Ptr) {
402 return erase_imp(PtrTraits::getAsVoidPointer(Ptr));
410 /// for (PtrType *Ptr : Set)
423 PtrType Ptr = PtrTraits::getFromVoidPointer(const_cast<void *>(*APtr));
424 if (P(Ptr)) {
440 PtrType Ptr = PtrTraits::getFromVoidPointer(const_cast<void *>(Value));
441 if (P(Ptr)) {
452 size_type count(ConstPtrType Ptr) const {
453 return contains_imp(ConstPtrTraits::getAsVoidPointer(Ptr));
455 iterator find(ConstPtrType Ptr) const {
456 return makeIterator(find_imp(ConstPtrTraits::getAsVoidPointer(Ptr)));
458 bool contains(ConstPtrType Ptr) const {
459 return contains_imp(ConstPtrTraits::getAsVoidPointer(Ptr));