| 499 | // Define this out-of-line to dissuade the C++ compiler from inlining it. |
| 500 | template <typename T, bool TriviallyCopyable> |
| 501 | void small_vector_template_base<T, TriviallyCopyable>::takeAllocationForGrow( |
| 502 | T *NewElts, size_t NewCapacity) { |
| 503 | // If this wasn't grown from the inline copy, deallocate the old space. |
| 504 | if (!this->isSmall()) free(this->begin()); |
| 505 | |
| 506 | this->BeginX = NewElts; |
| 507 | this->Capacity = NewCapacity; |
| 508 | } |
| 509 | |
| 510 | /// small_vector_template_base<TriviallyCopyable = true> - This is where we put |
| 511 | /// method implementations that are designed to work with trivially copyable |