proxygen
folly::fbvector< T, Allocator > Class Template Reference

#include <FBVector.h>

Classes

struct  Impl
 

Public Types

typedef T value_type
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef Titerator
 
typedef const Tconst_iterator
 
typedef size_t size_type
 
typedef std::make_signed< size_type >::type difference_type
 
typedef Allocator allocator_type
 
typedef A::pointer pointer
 
typedef A::const_pointer const_pointer
 
typedef std::reverse_iterator< iteratorreverse_iterator
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 

Public Member Functions

 fbvector ()=default
 
 fbvector (const Allocator &a)
 
 fbvector (size_type n, const Allocator &a=Allocator())
 
 fbvector (size_type n, VT value, const Allocator &a=Allocator())
 
template<class It , class Category = typename std::iterator_traits<It>::iterator_category>
 fbvector (It first, It last, const Allocator &a=Allocator())
 
 fbvector (const fbvector &other)
 
 fbvector (fbvector &&other) noexcept
 
 fbvector (const fbvector &other, const Allocator &a)
 
 fbvector (fbvector &&other, const Allocator &a)
 
 fbvector (std::initializer_list< T > il, const Allocator &a=Allocator())
 
 ~fbvector ()=default
 
fbvectoroperator= (const fbvector &other)
 
fbvectoroperator= (fbvector &&other)
 
fbvectoroperator= (std::initializer_list< T > il)
 
template<class It , class Category = typename std::iterator_traits<It>::iterator_category>
void assign (It first, It last)
 
void assign (size_type n, VT value)
 
void assign (std::initializer_list< T > il)
 
allocator_type get_allocator () const noexcept
 
iterator begin () noexcept
 
const_iterator begin () const noexcept
 
iterator end () noexcept
 
const_iterator end () const noexcept
 
reverse_iterator rbegin () noexcept
 
const_reverse_iterator rbegin () const noexcept
 
reverse_iterator rend () noexcept
 
const_reverse_iterator rend () const noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 
const_reverse_iterator crbegin () const noexcept
 
const_reverse_iterator crend () const noexcept
 
size_type size () const noexcept
 
size_type max_size () const noexcept
 
void resize (size_type n)
 
void resize (size_type n, VT t)
 
size_type capacity () const noexcept
 
bool empty () const noexcept
 
void reserve (size_type n)
 
void shrink_to_fit () noexcept
 
reference operator[] (size_type n)
 
const_reference operator[] (size_type n) const
 
const_reference at (size_type n) const
 
reference at (size_type n)
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
Tdata () noexcept
 
const Tdata () const noexcept
 
template<class... Args>
void emplace_back (Args &&...args)
 
void push_back (const T &value)
 
void push_back (T &&value)
 
void pop_back ()
 
void swap (fbvector &other) noexcept
 
void clear () noexcept
 
iterator erase (const_iterator position)
 
iterator erase (const_iterator first, const_iterator last)
 
template<class... Args>
iterator emplace (const_iterator cpos, Args &&...args)
 
iterator insert (const_iterator cpos, const T &value)
 
iterator insert (const_iterator cpos, T &&value)
 
iterator insert (const_iterator cpos, size_type n, VT value)
 
template<class It , class Category = typename std::iterator_traits<It>::iterator_category>
iterator insert (const_iterator cpos, It first, It last)
 
iterator insert (const_iterator cpos, std::initializer_list< T > il)
 
bool operator== (const fbvector &other) const
 
bool operator!= (const fbvector &other) const
 
bool operator< (const fbvector &other) const
 
bool operator> (const fbvector &other) const
 
bool operator<= (const fbvector &other) const
 
bool operator>= (const fbvector &other) const
 

Private Types

typedef std::allocator_traits< Allocator > A
 
typedef bool_constant< is_trivially_copyable< T >::value &&sizeof(T)<=16 > should_pass_by_value;typedef typename std::conditional< should_pass_by_value::value, T, const T & >::type VT;typedef typename std::conditional< should_pass_by_value::value, T, T && >::type MT;typedef bool_constant< std::is_same< Allocator, std::allocator< T > >::value > usingStdAllocator;typedef bool_constant< usingStdAllocator::value||A::propagate_on_container_move_assignment::value > moveIsSwap;private:T *M_allocate(size_type n){return impl_.D_allocate(n);}void M_deallocate(T *p, size_type n) noexcept{impl_.D_deallocate(p, n);}template< typename U, typename...Args > void M_construct(U *p, Args &&...args){if(usingStdAllocator::value){new(p) U(std::forward< Args >args)...);}else{std::allocator_traits< Allocator >::construct(impl_, p, std::forward< Args >args)...);}}template< typename U, typename...Args > static void S_construct(U *p, Args &&...args){new(p) U(std::forward< Args >args)...);}template< typename U, typename...Args > static void S_construct_a(Allocator &a, U *p, Args &&...args){std::allocator_traits< Allocator >::construct(a, p, std::forward< Args >args)...);}template< typename U, typename Enable=typename std::enable_if< std::is_scalar< U >::value >::type > void M_construct(U *p, U arg){if(usingStdAllocator::value){*p=arg;}else{std::allocator_traits< Allocator >::construct(impl_, p, arg);}}template< typename U, typename Enable=typename std::enable_if< std::is_scalar< U >::value >::type > static void S_construct(U *p, U arg){*p=arg;}template< typename U, typename Enable=typename std::enable_if< std::is_scalar< U >::value >::type > static void S_construct_a(Allocator &a, U *p, U arg){std::allocator_traits< Allocator >::construct(a, p, arg);}template< typename U, typename Enable=typename std::enable_if<!std::is_scalar< U >::value >::type > void M_construct(U *p, const U &value){if(usingStdAllocator::value){new(p) U(value);}else{std::allocator_traits< Allocator >::construct(impl_, p, value);}}template< typename U, typename Enable=typename std::enable_if<!std::is_scalar< U >::value >::type > static void S_construct(U *p, const U &value){new(p) U(value);}template< typename U, typename Enable=typename std::enable_if<!std::is_scalar< U >::value >::type > static void S_construct_a(Allocator &a, U *p, const U &value){std::allocator_traits< Allocator >::construct(a, p, value);}void M_destroy(T *p) noexcept{if(usingStdAllocator::value){if(!std::is_trivially_destructible< T >::value){p-> ~T()
 
typedef bool_constant< folly::IsRelocatable< T >::value &&usingStdAllocator::valuerelocate_use_memcpy
 
typedef bool_constant< (std::is_nothrow_move_constructible< T >::value &&usingStdAllocator::value)||!std::is_copy_constructible< T >::valuerelocate_use_move
 

Private Member Functions

void M_destroy_range_e (T *pos) noexcept
 
void D_destroy_range_a (T *first, T *last) noexcept
 
void M_uninitialized_fill_n_e (size_type sz)
 
void M_uninitialized_fill_n_e (size_type sz, VT value)
 
void D_uninitialized_fill_n_a (T *dest, size_type sz)
 
void D_uninitialized_fill_n_a (T *dest, size_type sz, VT value)
 
template<typename It >
void M_uninitialized_copy_e (It first, It last)
 
template<typename It >
void M_uninitialized_move_e (It first, It last)
 
template<typename It >
void D_uninitialized_copy_a (T *dest, It first, It last)
 
template<typename It >
void D_uninitialized_move_a (T *dest, It first, It last)
 
void M_relocate (T *newB)
 
void relocate_move (T *dest, T *first, T *last)
 
void relocate_move_or_memcpy (T *dest, T *first, T *last, std::true_type)
 
void relocate_move_or_memcpy (T *dest, T *first, T *last, std::false_type)
 
void relocate_move_or_copy (T *dest, T *first, T *last, std::true_type)
 
void relocate_move_or_copy (T *dest, T *first, T *last, std::false_type)
 
void relocate_done (T *, T *first, T *last) noexcept
 
void relocate_undo (T *dest, T *first, T *last) noexcept
 
template<class ForwardIterator >
 fbvector (ForwardIterator first, ForwardIterator last, const Allocator &a, std::forward_iterator_tag)
 
template<class InputIterator >
 fbvector (InputIterator first, InputIterator last, const Allocator &a, std::input_iterator_tag)
 
void moveFrom (fbvector &&other, std::true_type)
 
void moveFrom (fbvector &&other, std::false_type)
 
template<class ForwardIterator >
void assign (ForwardIterator first, ForwardIterator last, std::forward_iterator_tag)
 
template<class InputIterator >
void assign (InputIterator first, InputIterator last, std::input_iterator_tag)
 
bool dataIsInternalAndNotVT (const T &t)
 
bool dataIsInternal (const T &t)
 
bool reserve_in_place (size_type n)
 
size_type computePushBackCapacity () const
 
template<class... Args>
void emplace_back_aux (Args &&...args)
 
bool isValid (const_iterator it)
 
size_type computeInsertCapacity (size_type n)
 
void make_window (iterator position, size_type n)
 
void undo_window (iterator position, size_type n) noexcept
 
void wrap_frame (T *ledge, size_type idx, size_type n)
 
bool insert_use_fresh (bool at_end, size_type n)
 
template<typename IsInternalFunc , typename InsertInternalFunc , typename ConstructFunc , typename DestroyFunc >
iterator do_real_insert (const_iterator cpos, size_type n, IsInternalFunc &&isInternalFunc, InsertInternalFunc &&insertInternalFunc, ConstructFunc &&constructFunc, DestroyFunc &&destroyFunc)
 
template<class FIt >
iterator insert (const_iterator cpos, FIt first, FIt last, std::forward_iterator_tag)
 
template<class IIt >
iterator insert (const_iterator cpos, IIt first, IIt last, std::input_iterator_tag)
 

Static Private Member Functions

static void swap (Impl &a, Impl &b)
 
static void S_destroy_range_a (Allocator &a, T *first, T *last) noexcept
 
static void S_destroy_range (T *first, T *last) noexcept
 
template<typename... Args>
static void S_uninitialized_fill_n_a (Allocator &a, T *dest, size_type sz, Args &&...args)
 
static void S_uninitialized_fill_n (T *dest, size_type n)
 
static void S_uninitialized_fill_n (T *dest, size_type n, const T &value)
 
template<typename It >
static void S_uninitialized_copy_a (Allocator &a, T *dest, It first, It last)
 
template<typename It >
static void S_uninitialized_copy (T *dest, It first, It last)
 
static void S_uninitialized_copy_bits (T *dest, const T *first, const T *last)
 
static void S_uninitialized_copy_bits (T *dest, std::move_iterator< T * > first, std::move_iterator< T * > last)
 
template<typename It >
static void S_uninitialized_copy_bits (T *dest, It first, It last)
 
template<typename It >
static It S_copy_n (T *dest, It first, size_type n)
 
static const TS_copy_n (T *dest, const T *first, size_type n)
 
static std::move_iterator< T * > S_copy_n (T *dest, std::move_iterator< T * > mIt, size_type n)
 

Private Attributes

folly::fbvector::Impl impl_
 
 else
 

Friends

template<class _T , class _A >
_T * relinquish (fbvector< _T, _A > &)
 
template<class _T , class _A >
void attach (fbvector< _T, _A > &, _T *data, size_t sz, size_t cap)
 

Detailed Description

template<class T, class Allocator>
class folly::fbvector< T, Allocator >

Definition at line 49 of file FBVector.h.

Member Typedef Documentation

template<class T, class Allocator>
typedef std::allocator_traits<Allocator> folly::fbvector< T, Allocator >::A
private

Definition at line 82 of file FBVector.h.

template<class T, class Allocator>
typedef Allocator folly::fbvector< T, Allocator >::allocator_type

Definition at line 209 of file FBVector.h.

template<class T, class Allocator>
typedef const T* folly::fbvector< T, Allocator >::const_iterator

Definition at line 206 of file FBVector.h.

template<class T, class Allocator>
typedef A::const_pointer folly::fbvector< T, Allocator >::const_pointer

Definition at line 211 of file FBVector.h.

template<class T, class Allocator>
typedef const value_type& folly::fbvector< T, Allocator >::const_reference

Definition at line 204 of file FBVector.h.

template<class T, class Allocator>
typedef std::reverse_iterator<const_iterator> folly::fbvector< T, Allocator >::const_reverse_iterator

Definition at line 213 of file FBVector.h.

template<class T, class Allocator>
typedef std::make_signed<size_type>::type folly::fbvector< T, Allocator >::difference_type

Definition at line 208 of file FBVector.h.

template<class T, class Allocator>
typedef T* folly::fbvector< T, Allocator >::iterator

Definition at line 205 of file FBVector.h.

template<class T, class Allocator>
typedef A::pointer folly::fbvector< T, Allocator >::pointer

Definition at line 210 of file FBVector.h.

template<class T, class Allocator>
typedef value_type& folly::fbvector< T, Allocator >::reference

Definition at line 203 of file FBVector.h.

template<class T, class Allocator>
typedef bool_constant< folly::IsRelocatable<T>::value && usingStdAllocator::value> folly::fbvector< T, Allocator >::relocate_use_memcpy
private

Definition at line 658 of file FBVector.h.

template<class T, class Allocator>
typedef bool_constant< (std::is_nothrow_move_constructible<T>::value && usingStdAllocator::value) || !std::is_copy_constructible<T>::value> folly::fbvector< T, Allocator >::relocate_use_move
private

Definition at line 664 of file FBVector.h.

template<class T, class Allocator>
typedef std::reverse_iterator<iterator> folly::fbvector< T, Allocator >::reverse_iterator

Definition at line 212 of file FBVector.h.

template<class T, class Allocator>
typedef size_t folly::fbvector< T, Allocator >::size_type

Definition at line 207 of file FBVector.h.

template<class T, class Allocator>
typedef T folly::fbvector< T, Allocator >::value_type

Definition at line 202 of file FBVector.h.

template<class T, class Allocator>
typedef bool_constant< is_trivially_copyable<T>::value && sizeof(T) <= 16 > should_pass_by_value; typedef typename std::conditional<should_pass_by_value::value, T, const T&>::type VT; typedef typename std::conditional<should_pass_by_value::value, T, T&&>::type MT; typedef bool_constant<std::is_same<Allocator, std::allocator<T> >::value> usingStdAllocator; typedef bool_constant< usingStdAllocator::value || A::propagate_on_container_move_assignment::value> moveIsSwap; private: T* M_allocate(size_type n) { return impl_.D_allocate(n); } void M_deallocate(T* p, size_type n) noexcept { impl_.D_deallocate(p, n); } template <typename U, typename... Args> void M_construct(U* p, Args&&... args) { if (usingStdAllocator::value) { new (p) U(std::forward<Args>args)...); } else { std::allocator_traits<Allocator>::construct( impl_, p, std::forward<Args>args)...); } } template <typename U, typename... Args> static void S_construct(U* p, Args&&... args) { new (p) U(std::forward<Args>args)...); } template <typename U, typename... Args> static void S_construct_a(Allocator& a, U* p, Args&&... args) { std::allocator_traits<Allocator>::construct( a, p, std::forward<Args>args)...); } template < typename U, typename Enable = typename std::enable_if<std::is_scalar<U>::value>::type> void M_construct(U* p, U arg) { if (usingStdAllocator::value) { *p = arg; } else { std::allocator_traits<Allocator>::construct(impl_, p, arg); } } template < typename U, typename Enable = typename std::enable_if<std::is_scalar<U>::value>::type> static void S_construct(U* p, U arg) { *p = arg; } template < typename U, typename Enable = typename std::enable_if<std::is_scalar<U>::value>::type> static void S_construct_a(Allocator& a, U* p, U arg) { std::allocator_traits<Allocator>::construct(a, p, arg); } template < typename U, typename Enable = typename std::enable_if<!std::is_scalar<U>::value>::type> void M_construct(U* p, const U& value) { if (usingStdAllocator::value) { new (p) U(value); } else { std::allocator_traits<Allocator>::construct(impl_, p, value); } } template < typename U, typename Enable = typename std::enable_if<!std::is_scalar<U>::value>::type> static void S_construct(U* p, const U& value) { new (p) U(value); } template < typename U, typename Enable = typename std::enable_if<!std::is_scalar<U>::value>::type> static void S_construct_a(Allocator& a, U* p, const U& value) { std::allocator_traits<Allocator>::construct(a, p, value); } void M_destroy(T* p) noexcept { if (usingStdAllocator::value) { if (!std::is_trivially_destructible<T>::value) { p-> folly::fbvector< T, Allocator >::~T()
private

Definition at line 341 of file FBVector.h.

Constructor & Destructor Documentation

template<class T, class Allocator>
folly::fbvector< T, Allocator >::fbvector ( )
default
template<class T, class Allocator>
folly::fbvector< T, Allocator >::fbvector ( const Allocator &  a)
inlineexplicit

Definition at line 722 of file FBVector.h.

723 : impl_(a) {}
folly::fbvector::Impl impl_
char a
template<class T, class Allocator>
folly::fbvector< T, Allocator >::fbvector ( size_type  n,
const Allocator &  a = Allocator() 
)
inlineexplicit

Definition at line 724 of file FBVector.h.

726  : impl_(n, a) {
folly::fbvector::Impl impl_
void M_uninitialized_fill_n_e(size_type sz)
Definition: FBVector.h:401
char a
template<class T, class Allocator>
folly::fbvector< T, Allocator >::fbvector ( size_type  n,
VT  value,
const Allocator &  a = Allocator() 
)
inline

Definition at line 729 of file FBVector.h.

731  : impl_(n, a) {
folly::fbvector::Impl impl_
void M_uninitialized_fill_n_e(size_type sz)
Definition: FBVector.h:401
char a
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
template<class T, class Allocator>
template<class It , class Category = typename std::iterator_traits<It>::iterator_category>
folly::fbvector< T, Allocator >::fbvector ( It  first,
It  last,
const Allocator &  a = Allocator() 
)
inline

Definition at line 737 of file FBVector.h.

739  : fbvector(first, last, a, Category()) {}
char a
fbvector()=default
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
folly::fbvector< T, Allocator >::fbvector ( const fbvector< T, Allocator > &  other)
inline

Definition at line 740 of file FBVector.h.

742  : impl_(
743  other.size(),
744  A::select_on_container_copy_construction(other.impl_)) {
745  M_uninitialized_copy_e(other.begin(), other.end());
folly::fbvector::Impl impl_
void M_uninitialized_copy_e(It first, It last)
Definition: FBVector.h:492
template<class T, class Allocator>
folly::fbvector< T, Allocator >::fbvector ( fbvector< T, Allocator > &&  other)
inlinenoexcept

Definition at line 747 of file FBVector.h.

748 : impl_(std::move(other.impl_)) {}
folly::fbvector::Impl impl_
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
template<class T, class Allocator>
folly::fbvector< T, Allocator >::fbvector ( const fbvector< T, Allocator > &  other,
const Allocator &  a 
)
inline

Definition at line 749 of file FBVector.h.

751  : fbvector(other.begin(), other.end(), a) {}
char a
fbvector()=default
template<class T, class Allocator>
folly::fbvector< T, Allocator >::fbvector ( fbvector< T, Allocator > &&  other,
const Allocator &  a 
)
inline

Definition at line 752 of file FBVector.h.

753  : impl_(a) {
754  if (impl_ == other.impl_) {
755  impl_.swapData(other.impl_);
756  } else {
757  impl_.init(other.size());
758  M_uninitialized_move_e(other.begin(), other.end());
759  }
folly::fbvector::Impl impl_
void swapData(Impl &other)
Definition: FBVector.h:136
char a
void init(size_type n)
Definition: FBVector.h:158
void M_uninitialized_move_e(It first, It last)
Definition: FBVector.h:498
template<class T, class Allocator>
folly::fbvector< T, Allocator >::fbvector ( std::initializer_list< T il,
const Allocator &  a = Allocator() 
)
inline

Definition at line 761 of file FBVector.h.

763  : fbvector(il.begin(), il.end(), a) {}
char a
fbvector()=default
template<class T, class Allocator>
folly::fbvector< T, Allocator >::~fbvector ( )
default
template<class T, class Allocator>
template<class ForwardIterator >
folly::fbvector< T, Allocator >::fbvector ( ForwardIterator  first,
ForwardIterator  last,
const Allocator &  a,
std::forward_iterator_tag   
)
inlineprivate

Definition at line 837 of file FBVector.h.

843  : impl_(size_type(std::distance(first, last)), a) {
size_t size_type
Definition: FBVector.h:207
folly::fbvector::Impl impl_
void M_uninitialized_copy_e(It first, It last)
Definition: FBVector.h:492
char a
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
template<class InputIterator >
folly::fbvector< T, Allocator >::fbvector ( InputIterator  first,
InputIterator  last,
const Allocator &  a,
std::input_iterator_tag   
)
inlineprivate

Definition at line 847 of file FBVector.h.

853  : impl_(a) {
854  for (; first != last; ++first) {
856  }
folly::fbvector::Impl impl_
char a
void emplace_back(Args &&...args)
Definition: FBVector.h:1147
constexpr detail::First first
Definition: Base-inl.h:2553

Member Function Documentation

template<class T, class Allocator>
template<class It , class Category = typename std::iterator_traits<It>::iterator_category>
void folly::fbvector< T, Allocator >::assign ( It  first,
It  last 
)
inline

Definition at line 800 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::assign(), folly::fbvector< HTTPHeaderCode >::operator=(), and TEST().

801  {
802  assign(first, last, Category());
void assign(It first, It last)
Definition: FBVector.h:800
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::assign ( size_type  n,
VT  value 
)
inline

Definition at line 804 of file FBVector.h.

805  {
806  if (n > capacity()) {
807  // Not enough space. Do not reserve in place, since we will
808  // discard the old values anyways.
810  T copy(std::move(value));
811  impl_.reset(n);
813  } else {
814  impl_.reset(n);
816  }
817  } else if (n <= size()) {
818  auto newE = impl_.b_ + n;
819  std::fill(impl_.b_, newE, value);
820  M_destroy_range_e(newE);
821  } else {
822  std::fill(impl_.b_, impl_.e_, value);
824  }
folly::fbvector::Impl impl_
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
folly::std T
void M_destroy_range_e(T *pos) noexcept
Definition: FBVector.h:356
void M_uninitialized_fill_n_e(size_type sz)
Definition: FBVector.h:401
constexpr std::decay< T >::type copy(T &&value) noexcept(noexcept(typename std::decay< T >::type(std::forward< T >(value))))
Definition: Utility.h:72
bool dataIsInternalAndNotVT(const T &t)
Definition: FBVector.h:907
size_type capacity() const noexcept
Definition: FBVector.h:995
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
void reset(size_type newCap)
Definition: FBVector.h:175
size_type size() const noexcept
Definition: FBVector.h:964
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::assign ( std::initializer_list< T il)
inline

Definition at line 826 of file FBVector.h.

827  {
828  assign(il.begin(), il.end());
void assign(It first, It last)
Definition: FBVector.h:800
template<class T, class Allocator>
template<class ForwardIterator >
void folly::fbvector< T, Allocator >::assign ( ForwardIterator  first,
ForwardIterator  last,
std::forward_iterator_tag   
)
inlineprivate

Definition at line 873 of file FBVector.h.

877  {
878  const auto newSize = size_type(std::distance(first, last));
879  if (newSize > capacity()) {
880  impl_.reset(newSize);
882  } else if (newSize <= size()) {
883  auto newEnd = std::copy(first, last, impl_.b_);
884  M_destroy_range_e(newEnd);
885  } else {
886  auto mid = S_copy_n(impl_.b_, first, size());
887  M_uninitialized_copy_e<decltype(last)>(mid, last);
888  }
size_t size_type
Definition: FBVector.h:207
folly::fbvector::Impl impl_
void M_destroy_range_e(T *pos) noexcept
Definition: FBVector.h:356
constexpr std::decay< T >::type copy(T &&value) noexcept(noexcept(typename std::decay< T >::type(std::forward< T >(value))))
Definition: Utility.h:72
void M_uninitialized_copy_e(It first, It last)
Definition: FBVector.h:492
size_type capacity() const noexcept
Definition: FBVector.h:995
void reset(size_type newCap)
Definition: FBVector.h:175
size_type size() const noexcept
Definition: FBVector.h:964
static It S_copy_n(T *dest, It first, size_type n)
Definition: FBVector.h:582
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
template<class InputIterator >
void folly::fbvector< T, Allocator >::assign ( InputIterator  first,
InputIterator  last,
std::input_iterator_tag   
)
inlineprivate

Definition at line 892 of file FBVector.h.

893  {
894  auto p = impl_.b_;
895  for (; first != last && p != impl_.e_; ++first, ++p) {
896  *p = *first;
897  }
898  if (p != impl_.e_) {
900  } else {
901  for (; first != last; ++first) {
903  }
904  }
folly::fbvector::Impl impl_
void M_destroy_range_e(T *pos) noexcept
Definition: FBVector.h:356
void emplace_back(Args &&...args)
Definition: FBVector.h:1147
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
const_reference folly::fbvector< T, Allocator >::at ( size_type  n) const
inline

Definition at line 1103 of file FBVector.h.

1104  {
1105  if (UNLIKELY(n >= size())) {
1106  throw_exception<std::out_of_range>(
1107  "fbvector: index is greater than size.");
1108  }
1109  return (*this)[n];
size_type size() const noexcept
Definition: FBVector.h:964
#define UNLIKELY(x)
Definition: Likely.h:48
template<class T, class Allocator>
reference folly::fbvector< T, Allocator >::at ( size_type  n)
inline

Definition at line 1110 of file FBVector.h.

1111  {
1112  auto const& cThis = *this;
1113  return const_cast<reference>(cThis.at(n));
value_type & reference
Definition: FBVector.h:203
template<class T, class Allocator>
reference folly::fbvector< T, Allocator >::back ( )
inline

Definition at line 1122 of file FBVector.h.

Referenced by TEST().

1123  {
1124  assert(!empty());
1125  return impl_.e_[-1];
folly::fbvector::Impl impl_
bool empty() const noexcept
Definition: FBVector.h:999
template<class T, class Allocator>
const_reference folly::fbvector< T, Allocator >::back ( ) const
inline

Definition at line 1126 of file FBVector.h.

1127  {
1128  assert(!empty());
1129  return impl_.e_[-1];
folly::fbvector::Impl impl_
bool empty() const noexcept
Definition: FBVector.h:999
template<class T, class Allocator>
iterator folly::fbvector< T, Allocator >::begin ( )
inlinenoexcept
template<class T, class Allocator>
const_iterator folly::fbvector< T, Allocator >::begin ( ) const
inlinenoexcept

Definition at line 925 of file FBVector.h.

926  {
927  return impl_.b_;
folly::fbvector::Impl impl_
template<class T, class Allocator>
const_iterator folly::fbvector< T, Allocator >::cbegin ( ) const
inlinenoexcept

Definition at line 947 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::isValid().

948  {
949  return impl_.b_;
folly::fbvector::Impl impl_
template<class T, class Allocator>
const_iterator folly::fbvector< T, Allocator >::cend ( ) const
inlinenoexcept
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::clear ( )
inlinenoexcept

Definition at line 1188 of file FBVector.h.

Referenced by proxygen::HTTPHeaders::removeAll(), and TEST().

1189  {
folly::fbvector::Impl impl_
void M_destroy_range_e(T *pos) noexcept
Definition: FBVector.h:356
template<class T, class Allocator>
size_type folly::fbvector< T, Allocator >::computeInsertCapacity ( size_type  n)
inlineprivate

Definition at line 1271 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::do_real_insert().

1272  {
1274  size_type ac = folly::goodMallocSize(nc * sizeof(T)) / sizeof(T);
1275  return ac;
size_t size_type
Definition: FBVector.h:207
LogLevel max
Definition: LogLevel.cpp:31
folly::std T
size_type computePushBackCapacity() const
Definition: FBVector.h:1211
size_type size() const noexcept
Definition: FBVector.h:964
size_t goodMallocSize(size_t minSize) noexcept
Definition: Malloc.h:201
template<class T, class Allocator>
size_type folly::fbvector< T, Allocator >::computePushBackCapacity ( ) const
inlineprivate

Definition at line 1211 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::computeInsertCapacity(), and folly::fbvector< T, Allocator >::emplace_back_aux().

1212  {
1213  if (capacity() == 0) {
1214  return std::max(64 / sizeof(T), size_type(1));
1215  }
1216  if (capacity() < folly::jemallocMinInPlaceExpandable / sizeof(T)) {
1217  return capacity() * 2;
1218  }
1219  if (capacity() > 4096 * 32 / sizeof(T)) {
1220  return capacity() * 2;
1221  }
1222  return (capacity() * 3 + 1) / 2;
size_t size_type
Definition: FBVector.h:207
LogLevel max
Definition: LogLevel.cpp:31
folly::std T
static const size_t jemallocMinInPlaceExpandable
Definition: Malloc.h:221
size_type capacity() const noexcept
Definition: FBVector.h:995
template<class T, class Allocator>
const_reverse_iterator folly::fbvector< T, Allocator >::crbegin ( ) const
inlinenoexcept

Definition at line 953 of file FBVector.h.

954  {
955  return const_reverse_iterator(end());
iterator end() noexcept
Definition: FBVector.h:928
std::reverse_iterator< const_iterator > const_reverse_iterator
Definition: FBVector.h:213
template<class T, class Allocator>
const_reverse_iterator folly::fbvector< T, Allocator >::crend ( ) const
inlinenoexcept

Definition at line 956 of file FBVector.h.

957  {
958  return const_reverse_iterator(begin());
iterator begin() noexcept
Definition: FBVector.h:922
std::reverse_iterator< const_iterator > const_reverse_iterator
Definition: FBVector.h:213
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::D_destroy_range_a ( T first,
T last 
)
inlineprivatenoexcept

Definition at line 363 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::erase(), folly::fbvector< HTTPHeaderCode >::insert(), folly::fbvector< HTTPHeaderCode >::M_destroy_range_e(), folly::fbvector< HTTPHeaderCode >::make_window(), folly::fbvector< HTTPHeaderCode >::relocate_done(), folly::fbvector< HTTPHeaderCode >::relocate_undo(), and folly::fbvector< HTTPHeaderCode >::undo_window().

363  {
365  S_destroy_range(first, last);
366  } else {
367  S_destroy_range_a(impl_, first, last);
368  }
369  }
static void S_destroy_range_a(Allocator &a, T *first, T *last) noexcept
Definition: FBVector.h:372
static void S_destroy_range(T *first, T *last) noexcept
Definition: FBVector.h:379
folly::fbvector::Impl impl_
static const char *const value
Definition: Conv.cpp:50
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
template<typename It >
void folly::fbvector< T, Allocator >::D_uninitialized_copy_a ( T dest,
It  first,
It  last 
)
inlineprivate

Definition at line 505 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::D_uninitialized_move_a(), folly::fbvector< HTTPHeaderCode >::insert(), folly::fbvector< HTTPHeaderCode >::M_uninitialized_copy_e(), and folly::fbvector< HTTPHeaderCode >::relocate_move_or_copy().

506  {
510  } else {
512  }
513  } else {
515  }
folly::fbvector::Impl impl_
dest
Definition: upload.py:394
static void S_uninitialized_copy_a(Allocator &a, T *dest, It first, It last)
Definition: FBVector.h:525
static void S_uninitialized_copy(T *dest, It first, It last)
Definition: FBVector.h:539
std::is_trivially_copyable< T > is_trivially_copyable
Definition: Traits.h:313
static const char *const value
Definition: Conv.cpp:50
static void S_uninitialized_copy_bits(T *dest, const T *first, const T *last)
Definition: FBVector.h:552
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::D_uninitialized_fill_n_a ( T dest,
size_type  sz 
)
inlineprivate

Definition at line 412 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::insert(), and folly::fbvector< HTTPHeaderCode >::M_uninitialized_fill_n_e().

413  {
416  } else {
418  }
static void S_uninitialized_fill_n_a(Allocator &a, T *dest, size_type sz, Args &&...args)
Definition: FBVector.h:430
folly::fbvector::Impl impl_
dest
Definition: upload.py:394
static void S_uninitialized_fill_n(T *dest, size_type n)
Definition: FBVector.h:449
static const char *const value
Definition: Conv.cpp:50
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::D_uninitialized_fill_n_a ( T dest,
size_type  sz,
VT  value 
)
inlineprivate

Definition at line 420 of file FBVector.h.

421  {
424  } else {
426  }
static void S_uninitialized_fill_n_a(Allocator &a, T *dest, size_type sz, Args &&...args)
Definition: FBVector.h:430
folly::fbvector::Impl impl_
dest
Definition: upload.py:394
static void S_uninitialized_fill_n(T *dest, size_type n)
Definition: FBVector.h:449
static const char *const value
Definition: Conv.cpp:50
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
template<class T, class Allocator>
template<typename It >
void folly::fbvector< T, Allocator >::D_uninitialized_move_a ( T dest,
It  first,
It  last 
)
inlineprivate

Definition at line 518 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::M_uninitialized_move_e(), folly::fbvector< HTTPHeaderCode >::make_window(), and folly::fbvector< HTTPHeaderCode >::relocate_move_or_copy().

519  {
521  dest, std::make_move_iterator(first), std::make_move_iterator(last));
dest
Definition: upload.py:394
void D_uninitialized_copy_a(T *dest, It first, It last)
Definition: FBVector.h:505
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
T* folly::fbvector< T, Allocator >::data ( )
inlinenoexcept

Definition at line 1135 of file FBVector.h.

Referenced by folly::attach(), proxygen::HTTPHeaders::exists(), folly::fbvector< HTTPHeaderCode >::operator>=(), and TEST().

1135  :
1136  T* data() noexcept {
1137  return impl_.b_;
folly::fbvector::Impl impl_
folly::std T
requires E e noexcept(noexcept(s.error(std::move(e))))
T * data() noexcept
Definition: FBVector.h:1135
template<class T, class Allocator>
const T* folly::fbvector< T, Allocator >::data ( ) const
inlinenoexcept

Definition at line 1138 of file FBVector.h.

1139  {
1140  return impl_.b_;
folly::fbvector::Impl impl_
template<class T, class Allocator>
bool folly::fbvector< T, Allocator >::dataIsInternal ( const T t)
inlineprivate

Definition at line 913 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::dataIsInternalAndNotVT(), and folly::fbvector< HTTPHeaderCode >::insert().

914  {
915  return UNLIKELY(
916  impl_.b_ <= std::addressof(t) && std::addressof(t) < impl_.e_);
folly::fbvector::Impl impl_
#define UNLIKELY(x)
Definition: Likely.h:48
template<class T, class Allocator>
bool folly::fbvector< T, Allocator >::dataIsInternalAndNotVT ( const T t)
inlineprivate

Definition at line 907 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::assign(), folly::fbvector< HTTPHeaderCode >::insert(), and folly::fbvector< HTTPHeaderCode >::resize().

908  {
910  return false;
911  }
912  return dataIsInternal(t);
bool dataIsInternal(const T &t)
Definition: FBVector.h:913
static const char *const value
Definition: Conv.cpp:50
template<class T, class Allocator>
template<typename IsInternalFunc , typename InsertInternalFunc , typename ConstructFunc , typename DestroyFunc >
iterator folly::fbvector< T, Allocator >::do_real_insert ( const_iterator  cpos,
size_type  n,
IsInternalFunc &&  isInternalFunc,
InsertInternalFunc &&  insertInternalFunc,
ConstructFunc &&  constructFunc,
DestroyFunc &&  destroyFunc 
)
inlineprivate

Definition at line 1414 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::emplace(), and folly::fbvector< HTTPHeaderCode >::insert().

1421  {
1422  if (n == 0) {
1423  return iterator(cpos);
1424  }
1425  bool at_end = cpos == cend();
1426  bool fresh = insert_use_fresh(at_end, n);
1427  if (!at_end) {
1428  if (!fresh && isInternalFunc()) {
1429  // check for internal data (technically not required by the standard)
1430  return insertInternalFunc();
1431  }
1432  assert(isValid(cpos));
1433  }
1434  T* position = const_cast<T*>(cpos);
1435  size_type idx = size_type(std::distance(impl_.b_, position));
1436  T* b;
1437  size_type newCap; /* intentionally uninitialized */
1438 
1439  if (fresh) {
1440  newCap = computeInsertCapacity(n);
1441  b = M_allocate(newCap);
1442  } else {
1443  if (!at_end) {
1444  make_window(position, n);
1445  } else {
1446  impl_.e_ += n;
1447  }
1448  b = impl_.b_;
1449  }
1450 
1451  T* start = b + idx;
1452  try {
1453  // construct the inserted elements
1454  constructFunc(start);
1455  } catch (...) {
1456  if (fresh) {
1457  M_deallocate(b, newCap);
1458  } else {
1459  if (!at_end) {
1460  undo_window(position, n);
1461  } else {
1462  impl_.e_ -= n;
1463  }
1464  }
1465  throw;
1466  }
1467 
1468  if (fresh) {
1469  try {
1470  wrap_frame(b, idx, n);
1471  } catch (...) {
1472  // delete the inserted elements (exception has been thrown)
1473  destroyFunc(start);
1474  M_deallocate(b, newCap);
1475  throw;
1476  }
1477  if (impl_.b_) {
1478  M_deallocate(impl_.b_, capacity());
1479  }
1480  impl_.set(b, size() + n, newCap);
1481  return impl_.b_ + idx;
1482  } else {
1483  return position;
1484  }
size_type computeInsertCapacity(size_type n)
Definition: FBVector.h:1271
size_t size_type
Definition: FBVector.h:207
void set(pointer newB, size_type newSize, size_type newCap)
Definition: FBVector.h:169
folly::fbvector::Impl impl_
void undo_window(iterator position, size_type n) noexcept
Definition: FBVector.h:1362
char b
bool isValid(const_iterator it)
Definition: FBVector.h:1267
bool insert_use_fresh(bool at_end, size_type n)
Definition: FBVector.h:1388
folly::std T
void wrap_frame(T *ledge, size_type idx, size_type n)
Definition: FBVector.h:1370
auto start
size_type capacity() const noexcept
Definition: FBVector.h:995
const_iterator cend() const noexcept
Definition: FBVector.h:950
void make_window(iterator position, size_type n)
Definition: FBVector.h:1332
size_type size() const noexcept
Definition: FBVector.h:964
template<class T, class Allocator>
template<class... Args>
iterator folly::fbvector< T, Allocator >::emplace ( const_iterator  cpos,
Args &&...  args 
)
inline

Definition at line 1488 of file FBVector.h.

1489  {
1490  return do_real_insert(
1491  cpos,
1492  1,
1493  [&] { return false; },
1494  [&] { return iterator{}; },
1495  [&](iterator start) {
1496  M_construct(start, std::forward<Args>(args)...);
1497  },
1498  [&](iterator start) { M_destroy(start); });
iterator do_real_insert(const_iterator cpos, size_type n, IsInternalFunc &&isInternalFunc, InsertInternalFunc &&insertInternalFunc, ConstructFunc &&constructFunc, DestroyFunc &&destroyFunc)
Definition: FBVector.h:1414
auto start
template<class T, class Allocator>
template<class... Args>
void folly::fbvector< T, Allocator >::emplace_back ( Args &&...  args)
inline

Definition at line 1147 of file FBVector.h.

Referenced by proxygen::HTTPHeaders::add(), proxygen::HTTPHeaders::addFromCodec(), folly::fbvector< HTTPHeaderCode >::assign(), folly::fbvector< HTTPHeaderCode >::fbvector(), folly::fbvector< HTTPHeaderCode >::insert(), and TEST().

1148  {
1149  if (impl_.e_ != impl_.z_) {
1150  M_construct(impl_.e_, std::forward<Args>(args)...);
1151  ++impl_.e_;
1152  } else {
1153  emplace_back_aux(std::forward<Args>(args)...);
1154  }
folly::fbvector::Impl impl_
void emplace_back_aux(Args &&...args)
Definition: FBVector.h:1626
template<typename T , typename Allocator >
template<class... Args>
void folly::fbvector< T, Allocator >::emplace_back_aux ( Args &&...  args)
private

Definition at line 1626 of file FBVector.h.

References folly::fbvector< T, Allocator >::Impl::b_, folly::fbvector< T, Allocator >::computePushBackCapacity(), folly::fbvector< T, Allocator >::Impl::e_, folly::goodMallocSize(), folly::fbvector< T, Allocator >::impl_, folly::jemallocMinInPlaceExpandable, folly::fbvector< T, Allocator >::M_relocate(), folly::fbvector< T, Allocator >::relocate_move(), folly::fbvector< T, Allocator >::size(), folly::T, folly::usingJEMalloc(), value, xallocx, and folly::fbvector< T, Allocator >::Impl::z_.

Referenced by folly::fbvector< HTTPHeaderCode >::computePushBackCapacity(), folly::fbvector< HTTPHeaderCode >::emplace_back(), and folly::fbvector< HTTPHeaderCode >::push_back().

1627  {
1628  size_type byte_sz =
1631  ((impl_.z_ - impl_.b_) * sizeof(T) >=
1633  // Try to reserve in place.
1634  // Ask xallocx to allocate in place at least size()+1 and at most sz space.
1635  // xallocx will allocate as much as possible within that range, which
1636  // is the best possible outcome: if sz space is available, take it all,
1637  // otherwise take as much as possible. If nothing is available, then fail.
1638  // In this fashion, we never relocate if there is a possibility of
1639  // expanding in place, and we never reallocate by less than the desired
1640  // amount unless we cannot expand further. Hence we will not reallocate
1641  // sub-optimally twice in a row (modulo the blocking memory being freed).
1642  size_type lower = folly::goodMallocSize(sizeof(T) + size() * sizeof(T));
1643  size_type upper = byte_sz;
1644  size_type extra = upper - lower;
1645 
1646  void* p = impl_.b_;
1647  size_t actual;
1648 
1649  if ((actual = xallocx(p, lower, extra, 0)) >= lower) {
1650  impl_.z_ = impl_.b_ + actual / sizeof(T);
1651  M_construct(impl_.e_, std::forward<Args>(args)...);
1652  ++impl_.e_;
1653  return;
1654  }
1655  }
1656 
1657  // Reallocation failed. Perform a manual relocation.
1658  size_type sz = byte_sz / sizeof(T);
1659  auto newB = M_allocate(sz);
1660  auto newE = newB + size();
1661  try {
1663  // For linear memory access, relocate before construction.
1664  // By the test condition, relocate is noexcept.
1665  // Note that there is no cleanup to do if M_construct throws - that's
1666  // one of the beauties of relocation.
1667  // Benchmarks for this code have high variance, and seem to be close.
1668  relocate_move(newB, impl_.b_, impl_.e_);
1669  M_construct(newE, std::forward<Args>(args)...);
1670  ++newE;
1671  } else {
1672  M_construct(newE, std::forward<Args>(args)...);
1673  ++newE;
1674  try {
1675  M_relocate(newB);
1676  } catch (...) {
1677  M_destroy(newE - 1);
1678  throw;
1679  }
1680  }
1681  } catch (...) {
1682  M_deallocate(newB, sz);
1683  throw;
1684  }
1685  if (impl_.b_) {
1686  M_deallocate(impl_.b_, size());
1687  }
1688  impl_.b_ = newB;
1689  impl_.e_ = newE;
1690  impl_.z_ = newB + sz;
void M_relocate(T *newB)
Definition: FBVector.h:650
size_t size_type
Definition: FBVector.h:207
folly::fbvector::Impl impl_
bool usingJEMalloc() noexcept
Definition: Malloc.h:147
folly::std T
static const size_t jemallocMinInPlaceExpandable
Definition: Malloc.h:221
size_t(* xallocx)(void *, size_t, size_t, int)
Definition: MallocImpl.cpp:37
static const char *const value
Definition: Conv.cpp:50
size_type computePushBackCapacity() const
Definition: FBVector.h:1211
size_type size() const noexcept
Definition: FBVector.h:964
void relocate_move(T *dest, T *first, T *last)
Definition: FBVector.h:667
size_t goodMallocSize(size_t minSize) noexcept
Definition: Malloc.h:201
template<class T, class Allocator>
bool folly::fbvector< T, Allocator >::empty ( ) const
inlinenoexcept
template<class T, class Allocator>
const_iterator folly::fbvector< T, Allocator >::end ( ) const
inlinenoexcept

Definition at line 931 of file FBVector.h.

932  {
933  return impl_.e_;
folly::fbvector::Impl impl_
template<class T, class Allocator>
iterator folly::fbvector< T, Allocator >::erase ( const_iterator  position)
inline

Definition at line 1231 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::erase().

1231  :
1232  iterator erase(const_iterator position) {
1233  return erase(position, position + 1);
iterator erase(const_iterator position)
Definition: FBVector.h:1231
const T * const_iterator
Definition: FBVector.h:206
template<class T, class Allocator>
iterator folly::fbvector< T, Allocator >::erase ( const_iterator  first,
const_iterator  last 
)
inline

Definition at line 1235 of file FBVector.h.

1236  {
1237  assert(isValid(first) && isValid(last));
1238  assert(first <= last);
1239  if (first != last) {
1240  if (last == end()) {
1242  } else {
1245  if (last - first >= cend() - last) {
1246  std::memcpy((void*)first, (void*)last, (cend() - last) * sizeof(T));
1247  } else {
1248  std::memmove((iterator)first, last, (cend() - last) * sizeof(T));
1249  }
1250  impl_.e_ -= (last - first);
1251  } else {
1252  std::copy(
1253  std::make_move_iterator((iterator)last),
1254  std::make_move_iterator(end()),
1255  (iterator)first);
1256  auto newEnd = impl_.e_ - std::distance(first, last);
1257  M_destroy_range_e(newEnd);
1258  }
1259  }
1260  }
1261  return (iterator)first;
iterator end() noexcept
Definition: FBVector.h:928
folly::fbvector::Impl impl_
bool isValid(const_iterator it)
Definition: FBVector.h:1267
folly::std T
void M_destroy_range_e(T *pos) noexcept
Definition: FBVector.h:356
constexpr std::decay< T >::type copy(T &&value) noexcept(noexcept(typename std::decay< T >::type(std::forward< T >(value))))
Definition: Utility.h:72
static const char *const value
Definition: Conv.cpp:50
const_iterator cend() const noexcept
Definition: FBVector.h:950
void D_destroy_range_a(T *first, T *last) noexcept
Definition: FBVector.h:363
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
reference folly::fbvector< T, Allocator >::front ( )
inline

Definition at line 1114 of file FBVector.h.

Referenced by TEST().

1115  {
1116  assert(!empty());
1117  return *impl_.b_;
folly::fbvector::Impl impl_
bool empty() const noexcept
Definition: FBVector.h:999
template<class T, class Allocator>
const_reference folly::fbvector< T, Allocator >::front ( ) const
inline

Definition at line 1118 of file FBVector.h.

1119  {
1120  assert(!empty());
1121  return *impl_.b_;
folly::fbvector::Impl impl_
bool empty() const noexcept
Definition: FBVector.h:999
template<class T, class Allocator>
allocator_type folly::fbvector< T, Allocator >::get_allocator ( ) const
inlinenoexcept

Definition at line 830 of file FBVector.h.

831  {
832  return impl_;
folly::fbvector::Impl impl_
template<class T, class Allocator>
iterator folly::fbvector< T, Allocator >::insert ( const_iterator  cpos,
const T value 
)
inline

Definition at line 1500 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::insert(), and TEST().

1501  {
1502  return do_real_insert(
1503  cpos,
1504  1,
1505  [&] { return dataIsInternal(value); },
1506  [&] { return insert(cpos, T(value)); },
1507  [&](iterator start) { M_construct(start, value); },
1508  [&](iterator start) { M_destroy(start); });
iterator do_real_insert(const_iterator cpos, size_type n, IsInternalFunc &&isInternalFunc, InsertInternalFunc &&insertInternalFunc, ConstructFunc &&constructFunc, DestroyFunc &&destroyFunc)
Definition: FBVector.h:1414
bool dataIsInternal(const T &t)
Definition: FBVector.h:913
folly::std T
auto start
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
iterator insert(const_iterator cpos, const T &value)
Definition: FBVector.h:1500
template<class T, class Allocator>
iterator folly::fbvector< T, Allocator >::insert ( const_iterator  cpos,
T &&  value 
)
inline

Definition at line 1510 of file FBVector.h.

1511  {
1512  return do_real_insert(
1513  cpos,
1514  1,
1515  [&] { return dataIsInternal(value); },
1516  [&] { return insert(cpos, T(std::move(value))); },
1517  [&](iterator start) { M_construct(start, std::move(value)); },
1518  [&](iterator start) { M_destroy(start); });
iterator do_real_insert(const_iterator cpos, size_type n, IsInternalFunc &&isInternalFunc, InsertInternalFunc &&insertInternalFunc, ConstructFunc &&constructFunc, DestroyFunc &&destroyFunc)
Definition: FBVector.h:1414
bool dataIsInternal(const T &t)
Definition: FBVector.h:913
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
folly::std T
auto start
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
iterator insert(const_iterator cpos, const T &value)
Definition: FBVector.h:1500
template<class T, class Allocator>
iterator folly::fbvector< T, Allocator >::insert ( const_iterator  cpos,
size_type  n,
VT  value 
)
inline

Definition at line 1520 of file FBVector.h.

1521  {
1522  return do_real_insert(
1523  cpos,
1524  n,
1525  [&] { return dataIsInternalAndNotVT(value); },
1526  [&] { return insert(cpos, n, T(value)); },
1528  [&](iterator start) { D_destroy_range_a(start, start + n); });
iterator do_real_insert(const_iterator cpos, size_type n, IsInternalFunc &&isInternalFunc, InsertInternalFunc &&insertInternalFunc, ConstructFunc &&constructFunc, DestroyFunc &&destroyFunc)
Definition: FBVector.h:1414
folly::std T
void D_uninitialized_fill_n_a(T *dest, size_type sz)
Definition: FBVector.h:412
bool dataIsInternalAndNotVT(const T &t)
Definition: FBVector.h:907
auto start
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
void D_destroy_range_a(T *first, T *last) noexcept
Definition: FBVector.h:363
iterator insert(const_iterator cpos, const T &value)
Definition: FBVector.h:1500
template<class T, class Allocator>
template<class It , class Category = typename std::iterator_traits<It>::iterator_category>
iterator folly::fbvector< T, Allocator >::insert ( const_iterator  cpos,
It  first,
It  last 
)
inline

Definition at line 1533 of file FBVector.h.

1534  {
1535  return insert(cpos, first, last, Category());
iterator insert(const_iterator cpos, const T &value)
Definition: FBVector.h:1500
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
iterator folly::fbvector< T, Allocator >::insert ( const_iterator  cpos,
std::initializer_list< T il 
)
inline

Definition at line 1537 of file FBVector.h.

1538  {
1539  return insert(cpos, il.begin(), il.end());
iterator insert(const_iterator cpos, const T &value)
Definition: FBVector.h:1500
template<class T, class Allocator>
template<class FIt >
iterator folly::fbvector< T, Allocator >::insert ( const_iterator  cpos,
FIt  first,
FIt  last,
std::forward_iterator_tag   
)
inlineprivate

Definition at line 1546 of file FBVector.h.

1547  {
1548  size_type n = size_type(std::distance(first, last));
1549  return do_real_insert(
1550  cpos,
1551  n,
1552  [&] { return false; },
1553  [&] { return iterator{}; },
1554  [&](iterator start) { D_uninitialized_copy_a(start, first, last); },
1555  [&](iterator start) { D_destroy_range_a(start, start + n); });
size_t size_type
Definition: FBVector.h:207
iterator do_real_insert(const_iterator cpos, size_type n, IsInternalFunc &&isInternalFunc, InsertInternalFunc &&insertInternalFunc, ConstructFunc &&constructFunc, DestroyFunc &&destroyFunc)
Definition: FBVector.h:1414
void D_uninitialized_copy_a(T *dest, It first, It last)
Definition: FBVector.h:505
auto start
void D_destroy_range_a(T *first, T *last) noexcept
Definition: FBVector.h:363
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
template<class IIt >
iterator folly::fbvector< T, Allocator >::insert ( const_iterator  cpos,
IIt  first,
IIt  last,
std::input_iterator_tag   
)
inlineprivate

Definition at line 1559 of file FBVector.h.

1560  {
1561  T* position = const_cast<T*>(cpos);
1562  assert(isValid(position));
1563  size_type idx = std::distance(begin(), position);
1564 
1565  fbvector storage(
1566  std::make_move_iterator(position),
1567  std::make_move_iterator(end()),
1568  A::select_on_container_copy_construction(impl_));
1569  M_destroy_range_e(position);
1570  for (; first != last; ++first) {
1571  emplace_back(*first);
1572  }
1573  insert(
1574  cend(),
1575  std::make_move_iterator(storage.begin()),
1576  std::make_move_iterator(storage.end()));
1577  return impl_.b_ + idx;
iterator end() noexcept
Definition: FBVector.h:928
size_t size_type
Definition: FBVector.h:207
folly::fbvector::Impl impl_
bool isValid(const_iterator it)
Definition: FBVector.h:1267
folly::std T
void M_destroy_range_e(T *pos) noexcept
Definition: FBVector.h:356
iterator begin() noexcept
Definition: FBVector.h:922
fbvector()=default
void emplace_back(Args &&...args)
Definition: FBVector.h:1147
const_iterator cend() const noexcept
Definition: FBVector.h:950
iterator insert(const_iterator cpos, const T &value)
Definition: FBVector.h:1500
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
bool folly::fbvector< T, Allocator >::insert_use_fresh ( bool  at_end,
size_type  n 
)
inlineprivate

Definition at line 1388 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::do_real_insert().

1389  {
1390  if (at_end) {
1391  if (size() + n <= capacity()) {
1392  return false;
1393  }
1394  if (reserve_in_place(size() + n)) {
1395  return false;
1396  }
1397  return true;
1398  }
1399 
1400  if (size() + n > capacity()) {
1401  return true;
1402  }
1403 
1404  return false;
bool reserve_in_place(size_type n)
Definition: FBVector.h:1071
size_type capacity() const noexcept
Definition: FBVector.h:995
size_type size() const noexcept
Definition: FBVector.h:964
template<class T, class Allocator>
bool folly::fbvector< T, Allocator >::isValid ( const_iterator  it)
inlineprivate

Definition at line 1267 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::do_real_insert(), folly::fbvector< HTTPHeaderCode >::erase(), and folly::fbvector< HTTPHeaderCode >::insert().

1267  : // we have the private section first because it defines some macros
1268  bool isValid(const_iterator it) {
1269  return cbegin() <= it && it <= cend();
bool isValid(const_iterator it)
Definition: FBVector.h:1267
const T * const_iterator
Definition: FBVector.h:206
const_iterator cbegin() const noexcept
Definition: FBVector.h:947
const_iterator cend() const noexcept
Definition: FBVector.h:950
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::M_destroy_range_e ( T pos)
inlineprivatenoexcept
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::M_relocate ( T newB)
inlineprivate

Definition at line 650 of file FBVector.h.

Referenced by folly::fbvector< T, Allocator >::emplace_back_aux(), folly::fbvector< HTTPHeaderCode >::reserve(), and folly::fbvector< HTTPHeaderCode >::shrink_to_fit().

651  {
652  relocate_move(newB, impl_.b_, impl_.e_);
653  relocate_done(newB, impl_.b_, impl_.e_);
folly::fbvector::Impl impl_
void relocate_done(T *, T *first, T *last) noexcept
Definition: FBVector.h:690
void relocate_move(T *dest, T *first, T *last)
Definition: FBVector.h:667
template<class T, class Allocator>
template<typename It >
void folly::fbvector< T, Allocator >::M_uninitialized_copy_e ( It  first,
It  last 
)
inlineprivate

Definition at line 492 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::assign(), and folly::fbvector< HTTPHeaderCode >::fbvector().

493  {
495  impl_.e_ += std::distance(first, last);
folly::fbvector::Impl impl_
void D_uninitialized_copy_a(T *dest, It first, It last)
Definition: FBVector.h:505
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::M_uninitialized_fill_n_e ( size_type  sz)
inlineprivate

Definition at line 401 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::assign(), folly::fbvector< HTTPHeaderCode >::fbvector(), and folly::fbvector< HTTPHeaderCode >::resize().

402  {
404  impl_.e_ += sz;
folly::fbvector::Impl impl_
void D_uninitialized_fill_n_a(T *dest, size_type sz)
Definition: FBVector.h:412
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::M_uninitialized_fill_n_e ( size_type  sz,
VT  value 
)
inlineprivate

Definition at line 406 of file FBVector.h.

407  {
409  impl_.e_ += sz;
folly::fbvector::Impl impl_
void D_uninitialized_fill_n_a(T *dest, size_type sz)
Definition: FBVector.h:412
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
template<class T, class Allocator>
template<typename It >
void folly::fbvector< T, Allocator >::M_uninitialized_move_e ( It  first,
It  last 
)
inlineprivate

Definition at line 498 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::fbvector(), and folly::fbvector< HTTPHeaderCode >::moveFrom().

499  {
501  impl_.e_ += std::distance(first, last);
folly::fbvector::Impl impl_
void D_uninitialized_move_a(T *dest, It first, It last)
Definition: FBVector.h:518
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::make_window ( iterator  position,
size_type  n 
)
inlineprivate

Definition at line 1332 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::do_real_insert().

1333  {
1334  // The result is guaranteed to be non-negative, so use an unsigned type:
1335  size_type tail = size_type(std::distance(position, impl_.e_));
1336 
1337  if (tail <= n) {
1338  relocate_move(position + n, position, impl_.e_);
1339  relocate_done(position + n, position, impl_.e_);
1340  impl_.e_ += n;
1341  } else {
1343  std::memmove(position + n, position, tail * sizeof(T));
1344  impl_.e_ += n;
1345  } else {
1347  try {
1348  std::copy_backward(
1349  std::make_move_iterator(position),
1350  std::make_move_iterator(impl_.e_ - n),
1351  impl_.e_);
1352  } catch (...) {
1353  D_destroy_range_a(impl_.e_ - n, impl_.e_ + n);
1354  impl_.e_ -= n;
1355  throw;
1356  }
1357  impl_.e_ += n;
1358  D_destroy_range_a(position, position + n);
1359  }
1360  }
size_t size_type
Definition: FBVector.h:207
folly::fbvector::Impl impl_
void relocate_done(T *, T *first, T *last) noexcept
Definition: FBVector.h:690
folly::std T
static const char *const value
Definition: Conv.cpp:50
void D_uninitialized_move_a(T *dest, It first, It last)
Definition: FBVector.h:518
void D_destroy_range_a(T *first, T *last) noexcept
Definition: FBVector.h:363
void relocate_move(T *dest, T *first, T *last)
Definition: FBVector.h:667
template<class T, class Allocator>
size_type folly::fbvector< T, Allocator >::max_size ( ) const
inlinenoexcept

Definition at line 968 of file FBVector.h.

969  {
970  // good luck gettin' there
971  return ~size_type(0);
size_t size_type
Definition: FBVector.h:207
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::moveFrom ( fbvector< T, Allocator > &&  other,
std::true_type   
)
inlineprivate

Definition at line 859 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::operator=().

860  {
861  swap(impl_, other.impl_);
folly::fbvector::Impl impl_
static void swap(Impl &a, Impl &b)
Definition: FBVector.h:190
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::moveFrom ( fbvector< T, Allocator > &&  other,
std::false_type   
)
inlineprivate

Definition at line 862 of file FBVector.h.

863  {
864  if (impl_ == other.impl_) {
865  impl_.swapData(other.impl_);
866  } else {
867  impl_.reset(other.size());
868  M_uninitialized_move_e(other.begin(), other.end());
869  }
folly::fbvector::Impl impl_
void swapData(Impl &other)
Definition: FBVector.h:136
void M_uninitialized_move_e(It first, It last)
Definition: FBVector.h:498
void reset(size_type newCap)
Definition: FBVector.h:175
template<class T, class Allocator>
bool folly::fbvector< T, Allocator >::operator!= ( const fbvector< T, Allocator > &  other) const
inline

Definition at line 1587 of file FBVector.h.

1588  {
1589  return !(*this == other);
template<class T, class Allocator>
bool folly::fbvector< T, Allocator >::operator< ( const fbvector< T, Allocator > &  other) const
inline

Definition at line 1591 of file FBVector.h.

1592  {
1593  return std::lexicographical_compare(
1594  begin(), end(), other.begin(), other.end());
iterator end() noexcept
Definition: FBVector.h:928
iterator begin() noexcept
Definition: FBVector.h:922
template<class T, class Allocator>
bool folly::fbvector< T, Allocator >::operator<= ( const fbvector< T, Allocator > &  other) const
inline

Definition at line 1600 of file FBVector.h.

1601  {
1602  return !(*this > other);
template<class T, class Allocator>
fbvector& folly::fbvector< T, Allocator >::operator= ( const fbvector< T, Allocator > &  other)
inline

Definition at line 766 of file FBVector.h.

767  {
768  if (UNLIKELY(this == &other)) {
769  return *this;
770  }
771 
774  if (impl_ != other.impl_) {
775  // can't use other's different allocator to clean up self
776  impl_.reset();
777  }
778  (Allocator&)impl_ = (Allocator&)other.impl_;
779  }
780 
781  assign(other.begin(), other.end());
782  return *this;
folly::fbvector::Impl impl_
void assign(It first, It last)
Definition: FBVector.h:800
static const char *const value
Definition: Conv.cpp:50
void reset(size_type newCap)
Definition: FBVector.h:175
#define UNLIKELY(x)
Definition: Likely.h:48
template<class T, class Allocator>
fbvector& folly::fbvector< T, Allocator >::operator= ( fbvector< T, Allocator > &&  other)
inline

Definition at line 784 of file FBVector.h.

785  {
786  if (UNLIKELY(this == &other)) {
787  return *this;
788  }
789  moveFrom(std::move(other), moveIsSwap());
790  return *this;
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
void moveFrom(fbvector &&other, std::true_type)
Definition: FBVector.h:859
#define UNLIKELY(x)
Definition: Likely.h:48
template<class T, class Allocator>
fbvector& folly::fbvector< T, Allocator >::operator= ( std::initializer_list< T il)
inline

Definition at line 792 of file FBVector.h.

793  {
794  assign(il.begin(), il.end());
795  return *this;
void assign(It first, It last)
Definition: FBVector.h:800
template<class T, class Allocator>
bool folly::fbvector< T, Allocator >::operator== ( const fbvector< T, Allocator > &  other) const
inline

Definition at line 1583 of file FBVector.h.

1583  :
1584  bool operator==(const fbvector& other) const {
1585  return size() == other.size() && std::equal(begin(), end(), other.begin());
iterator end() noexcept
Definition: FBVector.h:928
iterator begin() noexcept
Definition: FBVector.h:922
bool operator==(const fbvector &other) const
Definition: FBVector.h:1583
fbvector()=default
size_type size() const noexcept
Definition: FBVector.h:964
template<class T, class Allocator>
bool folly::fbvector< T, Allocator >::operator> ( const fbvector< T, Allocator > &  other) const
inline

Definition at line 1596 of file FBVector.h.

1597  {
1598  return other < *this;
template<class T, class Allocator>
bool folly::fbvector< T, Allocator >::operator>= ( const fbvector< T, Allocator > &  other) const
inline

Definition at line 1604 of file FBVector.h.

1605  {
1606  return !(*this < other);
template<class T, class Allocator>
reference folly::fbvector< T, Allocator >::operator[] ( size_type  n)
inline

Definition at line 1095 of file FBVector.h.

1095  :
1097  assert(n < size());
1098  return impl_.b_[n];
size_t size_type
Definition: FBVector.h:207
folly::fbvector::Impl impl_
reference operator[](size_type n)
Definition: FBVector.h:1095
size_type size() const noexcept
Definition: FBVector.h:964
value_type & reference
Definition: FBVector.h:203
template<class T, class Allocator>
const_reference folly::fbvector< T, Allocator >::operator[] ( size_type  n) const
inline

Definition at line 1099 of file FBVector.h.

1100  {
1101  assert(n < size());
1102  return impl_.b_[n];
folly::fbvector::Impl impl_
size_type size() const noexcept
Definition: FBVector.h:964
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::pop_back ( )
inline

Definition at line 1174 of file FBVector.h.

1175  {
1176  assert(!empty());
1177  --impl_.e_;
1178  M_destroy(impl_.e_);
folly::fbvector::Impl impl_
bool empty() const noexcept
Definition: FBVector.h:999
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::push_back ( const T value)
inline

Definition at line 1156 of file FBVector.h.

Referenced by proxygen::HTTPHeaders::add(), proxygen::HTTPHeaders::addFromCodec(), folly::IOBuf::appendToIov(), proxygen::HTTPHeaders::copyTo(), proxygen::HTTPHeaders::stripPerHopHeaders(), TEST(), and proxygen::HTTPHeaders::transferHeaderIfPresent().

1157  {
1158  if (impl_.e_ != impl_.z_) {
1159  M_construct(impl_.e_, value);
1160  ++impl_.e_;
1161  } else {
1163  }
folly::fbvector::Impl impl_
void emplace_back_aux(Args &&...args)
Definition: FBVector.h:1626
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::push_back ( T &&  value)
inline

Definition at line 1165 of file FBVector.h.

1166  {
1167  if (impl_.e_ != impl_.z_) {
1168  M_construct(impl_.e_, std::move(value));
1169  ++impl_.e_;
1170  } else {
1172  }
folly::fbvector::Impl impl_
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
void emplace_back_aux(Args &&...args)
Definition: FBVector.h:1626
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
template<class T, class Allocator>
reverse_iterator folly::fbvector< T, Allocator >::rbegin ( )
inlinenoexcept

Definition at line 934 of file FBVector.h.

935  {
936  return reverse_iterator(end());
iterator end() noexcept
Definition: FBVector.h:928
std::reverse_iterator< iterator > reverse_iterator
Definition: FBVector.h:212
template<class T, class Allocator>
const_reverse_iterator folly::fbvector< T, Allocator >::rbegin ( ) const
inlinenoexcept

Definition at line 937 of file FBVector.h.

938  {
939  return const_reverse_iterator(end());
iterator end() noexcept
Definition: FBVector.h:928
std::reverse_iterator< const_iterator > const_reverse_iterator
Definition: FBVector.h:213
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::relocate_done ( T ,
T first,
T last 
)
inlineprivatenoexcept

Definition at line 690 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::M_relocate(), folly::fbvector< HTTPHeaderCode >::make_window(), and folly::fbvector< HTTPHeaderCode >::wrap_frame().

691  {
693  // used memcpy; data has been relocated, do not call destructor
694  } else {
695  D_destroy_range_a(first, last);
696  }
static const char *const value
Definition: Conv.cpp:50
void D_destroy_range_a(T *first, T *last) noexcept
Definition: FBVector.h:363
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::relocate_move ( T dest,
T first,
T last 
)
inlineprivate

Definition at line 667 of file FBVector.h.

Referenced by folly::fbvector< T, Allocator >::emplace_back_aux(), folly::fbvector< HTTPHeaderCode >::M_relocate(), folly::fbvector< HTTPHeaderCode >::make_window(), folly::fbvector< HTTPHeaderCode >::relocate_undo(), and folly::fbvector< HTTPHeaderCode >::wrap_frame().

668  {
dest
Definition: upload.py:394
void relocate_move_or_memcpy(T *dest, T *first, T *last, std::true_type)
Definition: FBVector.h:671
bool_constant< folly::IsRelocatable< T >::value &&usingStdAllocator::value > relocate_use_memcpy
Definition: FBVector.h:658
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::relocate_move_or_copy ( T dest,
T first,
T last,
std::true_type   
)
inlineprivate

Definition at line 681 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::relocate_move_or_memcpy().

682  {
dest
Definition: upload.py:394
void D_uninitialized_move_a(T *dest, It first, It last)
Definition: FBVector.h:518
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::relocate_move_or_copy ( T dest,
T first,
T last,
std::false_type   
)
inlineprivate

Definition at line 685 of file FBVector.h.

686  {
dest
Definition: upload.py:394
void D_uninitialized_copy_a(T *dest, It first, It last)
Definition: FBVector.h:505
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::relocate_move_or_memcpy ( T dest,
T first,
T last,
std::true_type   
)
inlineprivate

Definition at line 671 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::relocate_move().

672  {
673  if (first != nullptr) {
674  std::memcpy((void*)dest, (void*)first, (last - first) * sizeof(T));
675  }
dest
Definition: upload.py:394
folly::std T
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::relocate_move_or_memcpy ( T dest,
T first,
T last,
std::false_type   
)
inlineprivate

Definition at line 677 of file FBVector.h.

678  {
dest
Definition: upload.py:394
bool_constant< (std::is_nothrow_move_constructible< T >::value &&usingStdAllocator::value)||!std::is_copy_constructible< T >::value > relocate_use_move
Definition: FBVector.h:664
void relocate_move_or_copy(T *dest, T *first, T *last, std::true_type)
Definition: FBVector.h:681
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::relocate_undo ( T dest,
T first,
T last 
)
inlineprivatenoexcept

Definition at line 699 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::wrap_frame().

700  {
702  // used memcpy, old data is still valid, nothing to do
703  } else if (
706  // noexcept move everything back, aka relocate_move
707  relocate_move(first, dest, dest + (last - first));
709  // weak guarantee
710  D_destroy_range_a(dest, dest + (last - first));
711  } else {
712  // used copy, old data is still valid
713  D_destroy_range_a(dest, dest + (last - first));
714  }
dest
Definition: upload.py:394
static const char *const value
Definition: Conv.cpp:50
void D_destroy_range_a(T *first, T *last) noexcept
Definition: FBVector.h:363
void relocate_move(T *dest, T *first, T *last)
Definition: FBVector.h:667
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
reverse_iterator folly::fbvector< T, Allocator >::rend ( )
inlinenoexcept

Definition at line 940 of file FBVector.h.

941  {
942  return reverse_iterator(begin());
iterator begin() noexcept
Definition: FBVector.h:922
std::reverse_iterator< iterator > reverse_iterator
Definition: FBVector.h:212
template<class T, class Allocator>
const_reverse_iterator folly::fbvector< T, Allocator >::rend ( ) const
inlinenoexcept

Definition at line 943 of file FBVector.h.

944  {
945  return const_reverse_iterator(begin());
iterator begin() noexcept
Definition: FBVector.h:922
std::reverse_iterator< const_iterator > const_reverse_iterator
Definition: FBVector.h:213
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::reserve ( size_type  n)
inline

Definition at line 1003 of file FBVector.h.

Referenced by folly::IOBuf::getIov(), proxygen::HTTPHeaders::HTTPHeaders(), folly::fbvector< HTTPHeaderCode >::resize(), and TEST().

1004  {
1005  if (n <= capacity()) {
1006  return;
1007  }
1008  if (impl_.b_ && reserve_in_place(n)) {
1009  return;
1010  }
1011 
1012  auto newCap = folly::goodMallocSize(n * sizeof(T)) / sizeof(T);
1013  auto newB = M_allocate(newCap);
1014  try {
1015  M_relocate(newB);
1016  } catch (...) {
1017  M_deallocate(newB, newCap);
1018  throw;
1019  }
1020  if (impl_.b_) {
1021  M_deallocate(impl_.b_, size_type(impl_.z_ - impl_.b_));
1022  }
1023  impl_.z_ = newB + newCap;
1024  impl_.e_ = newB + (impl_.e_ - impl_.b_);
1025  impl_.b_ = newB;
void M_relocate(T *newB)
Definition: FBVector.h:650
size_t size_type
Definition: FBVector.h:207
folly::fbvector::Impl impl_
folly::std T
bool reserve_in_place(size_type n)
Definition: FBVector.h:1071
size_type capacity() const noexcept
Definition: FBVector.h:995
size_t goodMallocSize(size_t minSize) noexcept
Definition: Malloc.h:201
template<class T, class Allocator>
bool folly::fbvector< T, Allocator >::reserve_in_place ( size_type  n)
inlineprivate

Definition at line 1071 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::insert_use_fresh(), and folly::fbvector< HTTPHeaderCode >::reserve().

1071  :
1072  bool reserve_in_place(size_type n) {
1074  return false;
1075  }
1076 
1077  // jemalloc can never grow in place blocks smaller than 4096 bytes.
1078  if ((impl_.z_ - impl_.b_) * sizeof(T) <
1080  return false;
1081  }
1082 
1083  auto const newCapacityBytes = folly::goodMallocSize(n * sizeof(T));
1084  void* p = impl_.b_;
1085  if (xallocx(p, newCapacityBytes, 0, 0) == newCapacityBytes) {
1086  impl_.z_ = impl_.b_ + newCapacityBytes / sizeof(T);
1087  return true;
1088  }
1089  return false;
size_t size_type
Definition: FBVector.h:207
folly::fbvector::Impl impl_
bool usingJEMalloc() noexcept
Definition: Malloc.h:147
folly::std T
static const size_t jemallocMinInPlaceExpandable
Definition: Malloc.h:221
size_t(* xallocx)(void *, size_t, size_t, int)
Definition: MallocImpl.cpp:37
static const char *const value
Definition: Conv.cpp:50
bool reserve_in_place(size_type n)
Definition: FBVector.h:1071
size_t goodMallocSize(size_t minSize) noexcept
Definition: Malloc.h:201
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::resize ( size_type  n)
inline

Definition at line 973 of file FBVector.h.

974  {
975  if (n <= size()) {
977  } else {
978  reserve(n);
980  }
folly::fbvector::Impl impl_
void reserve(size_type n)
Definition: FBVector.h:1003
void M_destroy_range_e(T *pos) noexcept
Definition: FBVector.h:356
void M_uninitialized_fill_n_e(size_type sz)
Definition: FBVector.h:401
size_type size() const noexcept
Definition: FBVector.h:964
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::resize ( size_type  n,
VT  t 
)
inline

Definition at line 982 of file FBVector.h.

983  {
984  if (n <= size()) {
986  } else if (dataIsInternalAndNotVT(t) && n > capacity()) {
987  T copy(t);
988  reserve(n);
990  } else {
991  reserve(n);
993  }
folly::fbvector::Impl impl_
void reserve(size_type n)
Definition: FBVector.h:1003
folly::std T
void M_destroy_range_e(T *pos) noexcept
Definition: FBVector.h:356
void M_uninitialized_fill_n_e(size_type sz)
Definition: FBVector.h:401
constexpr std::decay< T >::type copy(T &&value) noexcept(noexcept(typename std::decay< T >::type(std::forward< T >(value))))
Definition: Utility.h:72
bool dataIsInternalAndNotVT(const T &t)
Definition: FBVector.h:907
size_type capacity() const noexcept
Definition: FBVector.h:995
size_type size() const noexcept
Definition: FBVector.h:964
template<class T, class Allocator>
template<typename It >
static It folly::fbvector< T, Allocator >::S_copy_n ( T dest,
It  first,
size_type  n 
)
inlinestaticprivate

Definition at line 582 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::assign().

583  {
584  auto e = dest + n;
585  for (; dest != e; ++dest, ++first) {
586  *dest = *first;
587  }
588  return first;
dest
Definition: upload.py:394
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
static const T* folly::fbvector< T, Allocator >::S_copy_n ( T dest,
const T first,
size_type  n 
)
inlinestaticprivate

Definition at line 590 of file FBVector.h.

591  {
593  std::memcpy((void*)dest, (void*)first, n * sizeof(T));
594  return first + n;
595  } else {
596  return S_copy_n<const T*>(dest, first, n);
597  }
dest
Definition: upload.py:394
folly::std T
static const char *const value
Definition: Conv.cpp:50
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
static std::move_iterator<T*> folly::fbvector< T, Allocator >::S_copy_n ( T dest,
std::move_iterator< T * >  mIt,
size_type  n 
)
inlinestaticprivate

Definition at line 600 of file FBVector.h.

601  {
603  T* first = mIt.base();
604  std::memcpy((void*)dest, (void*)first, n * sizeof(T));
605  return std::make_move_iterator(first + n);
606  } else {
607  return S_copy_n<std::move_iterator<T*>>(dest, mIt, n);
608  }
dest
Definition: upload.py:394
folly::std T
static const char *const value
Definition: Conv.cpp:50
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
static void folly::fbvector< T, Allocator >::S_destroy_range ( T first,
T last 
)
inlinestaticprivatenoexcept

Definition at line 379 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::D_destroy_range_a(), folly::fbvector< T, Allocator >::Impl::destroy(), folly::fbvector< HTTPHeaderCode >::S_uninitialized_copy(), and folly::fbvector< HTTPHeaderCode >::S_uninitialized_fill_n().

379  {
381 #define FOLLY_FBV_OP(p) (p)->~T()
382  // EXPERIMENTAL DATA on fbvector<vector<int>> (where each vector<int> has
383  // size 0).
384  // The unrolled version seems to work faster for small to medium sized
385  // fbvectors. It gets a 10% speedup on fbvectors of size 1024, 64, and
386  // 16.
387  // The simple loop version seems to work faster for large fbvectors. The
388  // unrolled version is about 6% slower on fbvectors on size 16384.
389  // The two methods seem tied for very large fbvectors. The unrolled
390  // version is about 0.5% slower on size 262144.
391 
392  // for (; first != last; ++first) first->~T();
394 #undef FOLLY_FBV_OP
395  }
#define FOLLY_FBV_UNROLL_PTR(first, last, OP)
Definition: FBVector.h:55
#define FOLLY_FBV_OP(p)
static const char *const value
Definition: Conv.cpp:50
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
static void folly::fbvector< T, Allocator >::S_destroy_range_a ( Allocator &  a,
T first,
T last 
)
inlinestaticprivatenoexcept
template<class T, class Allocator>
template<typename It >
static void folly::fbvector< T, Allocator >::S_uninitialized_copy ( T dest,
It  first,
It  last 
)
inlinestaticprivate

Definition at line 539 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::D_uninitialized_copy_a(), and folly::fbvector< HTTPHeaderCode >::S_uninitialized_copy_bits().

540  {
541  auto b = dest;
542  try {
543  for (; first != last; ++first, ++b) {
544  S_construct(b, *first);
545  }
546  } catch (...) {
548  throw;
549  }
static void S_destroy_range(T *first, T *last) noexcept
Definition: FBVector.h:379
char b
dest
Definition: upload.py:394
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
template<typename It >
static void folly::fbvector< T, Allocator >::S_uninitialized_copy_a ( Allocator &  a,
T dest,
It  first,
It  last 
)
inlinestaticprivate

Definition at line 525 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::D_uninitialized_copy_a().

526  {
527  auto b = dest;
528  try {
529  for (; first != last; ++first, ++b) {
530  std::allocator_traits<Allocator>::construct(a, b, *first);
531  }
532  } catch (...) {
534  throw;
535  }
static void S_destroy_range_a(Allocator &a, T *first, T *last) noexcept
Definition: FBVector.h:372
char b
dest
Definition: upload.py:394
char a
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
static void folly::fbvector< T, Allocator >::S_uninitialized_copy_bits ( T dest,
const T first,
const T last 
)
inlinestaticprivate

Definition at line 552 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::D_uninitialized_copy_a().

553  {
554  if (last != first) {
555  std::memcpy((void*)dest, (void*)first, (last - first) * sizeof(T));
556  }
dest
Definition: upload.py:394
folly::std T
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
static void folly::fbvector< T, Allocator >::S_uninitialized_copy_bits ( T dest,
std::move_iterator< T * >  first,
std::move_iterator< T * >  last 
)
inlinestaticprivate

Definition at line 558 of file FBVector.h.

562  {
563  T* bFirst = first.base();
564  T* bLast = last.base();
565  if (bLast != bFirst) {
566  std::memcpy((void*)dest, (void*)bFirst, (bLast - bFirst) * sizeof(T));
567  }
dest
Definition: upload.py:394
folly::std T
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
template<typename It >
static void folly::fbvector< T, Allocator >::S_uninitialized_copy_bits ( T dest,
It  first,
It  last 
)
inlinestaticprivate

Definition at line 570 of file FBVector.h.

571  {
dest
Definition: upload.py:394
static void S_uninitialized_copy(T *dest, It first, It last)
Definition: FBVector.h:539
constexpr detail::First first
Definition: Base-inl.h:2553
template<class T, class Allocator>
static void folly::fbvector< T, Allocator >::S_uninitialized_fill_n ( T dest,
size_type  n 
)
inlinestaticprivate

Definition at line 449 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::D_uninitialized_fill_n_a().

450  {
452  if (LIKELY(n != 0)) {
453  std::memset(dest, 0, sizeof(T) * n);
454  }
455  } else {
456  auto b = dest;
457  auto e = dest + n;
458  try {
459  for (; b != e; ++b) {
460  S_construct(b);
461  }
462  } catch (...) {
463  --b;
464  for (; b >= dest; --b) {
465  b->~T();
466  }
467  throw;
468  }
469  }
char b
#define LIKELY(x)
Definition: Likely.h:47
dest
Definition: upload.py:394
folly::std T
template<class T, class Allocator>
static void folly::fbvector< T, Allocator >::S_uninitialized_fill_n ( T dest,
size_type  n,
const T value 
)
inlinestaticprivate

Definition at line 471 of file FBVector.h.

472  {
473  auto b = dest;
474  auto e = dest + n;
475  try {
476  for (; b != e; ++b) {
477  S_construct(b, value);
478  }
479  } catch (...) {
481  throw;
482  }
static void S_destroy_range(T *first, T *last) noexcept
Definition: FBVector.h:379
char b
dest
Definition: upload.py:394
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
template<class T, class Allocator>
template<typename... Args>
static void folly::fbvector< T, Allocator >::S_uninitialized_fill_n_a ( Allocator &  a,
T dest,
size_type  sz,
Args &&...  args 
)
inlinestaticprivate

Definition at line 430 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::D_uninitialized_fill_n_a().

435  {
436  auto b = dest;
437  auto e = dest + sz;
438  try {
439  for (; b != e; ++b) {
440  std::allocator_traits<Allocator>::construct(
441  a, b, std::forward<Args>(args)...);
442  }
443  } catch (...) {
445  throw;
446  }
static void S_destroy_range_a(Allocator &a, T *first, T *last) noexcept
Definition: FBVector.h:372
char b
dest
Definition: upload.py:394
char a
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::shrink_to_fit ( )
inlinenoexcept

Definition at line 1027 of file FBVector.h.

Referenced by TEST().

1028  {
1029  if (empty()) {
1030  impl_.reset();
1031  return;
1032  }
1033 
1034  auto const newCapacityBytes = folly::goodMallocSize(size() * sizeof(T));
1035  auto const newCap = newCapacityBytes / sizeof(T);
1036  auto const oldCap = capacity();
1037 
1038  if (newCap >= oldCap) {
1039  return;
1040  }
1041 
1042  void* p = impl_.b_;
1043  // xallocx() will shrink to precisely newCapacityBytes (which was generated
1044  // by goodMallocSize()) if it successfully shrinks in place.
1046  newCapacityBytes >= folly::jemallocMinInPlaceExpandable &&
1047  xallocx(p, newCapacityBytes, 0, 0) == newCapacityBytes) {
1048  impl_.z_ += newCap - oldCap;
1049  } else {
1050  T* newB; // intentionally uninitialized
1051  try {
1052  newB = M_allocate(newCap);
1053  try {
1054  M_relocate(newB);
1055  } catch (...) {
1056  M_deallocate(newB, newCap);
1057  return; // swallow the error
1058  }
1059  } catch (...) {
1060  return;
1061  }
1062  if (impl_.b_) {
1063  M_deallocate(impl_.b_, size_type(impl_.z_ - impl_.b_));
1064  }
1065  impl_.z_ = newB + newCap;
1066  impl_.e_ = newB + (impl_.e_ - impl_.b_);
1067  impl_.b_ = newB;
1068  }
void M_relocate(T *newB)
Definition: FBVector.h:650
size_t size_type
Definition: FBVector.h:207
folly::fbvector::Impl impl_
bool usingJEMalloc() noexcept
Definition: Malloc.h:147
folly::std T
static const size_t jemallocMinInPlaceExpandable
Definition: Malloc.h:221
size_t(* xallocx)(void *, size_t, size_t, int)
Definition: MallocImpl.cpp:37
static const char *const value
Definition: Conv.cpp:50
bool empty() const noexcept
Definition: FBVector.h:999
size_type capacity() const noexcept
Definition: FBVector.h:995
void reset(size_type newCap)
Definition: FBVector.h:175
size_type size() const noexcept
Definition: FBVector.h:964
size_t goodMallocSize(size_t minSize) noexcept
Definition: Malloc.h:201
template<class T, class Allocator>
size_type folly::fbvector< T, Allocator >::size ( ) const
inlinenoexcept

Definition at line 964 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::assign(), folly::fbvector< HTTPHeaderCode >::at(), folly::fbvector< HTTPHeaderCode >::computeInsertCapacity(), proxygen::HTTPHeaders::copyTo(), proxygen::HTTPHeaders::disposeOfHeaderNames(), folly::fbvector< HTTPHeaderCode >::do_real_insert(), folly::fbvector< T, Allocator >::emplace_back_aux(), proxygen::HTTPHeaders::exists(), proxygen::HTTPHeaders::forEach(), proxygen::HTTPHeaders::forEachWithCode(), proxygen::HTTPHeaders::HTTPHeaders(), folly::fbvector< HTTPHeaderCode >::insert_use_fresh(), proxygen::HTTPHeaders::operator=(), folly::fbvector< HTTPHeaderCode >::operator==(), folly::fbvector< HTTPHeaderCode >::operator[](), proxygen::HTTPHeaders::removeByPredicate(), folly::fbvector< HTTPHeaderCode >::resize(), folly::fbvector< HTTPHeaderCode >::shrink_to_fit(), proxygen::HTTPHeaders::size(), proxygen::HTTPHeaders::stripPerHopHeaders(), TEST(), and folly::fbvector< HTTPHeaderCode >::wrap_frame().

964  :
966  return size_type(impl_.e_ - impl_.b_);
size_t size_type
Definition: FBVector.h:207
folly::fbvector::Impl impl_
requires E e noexcept(noexcept(s.error(std::move(e))))
const
Definition: upload.py:398
size_type size() const noexcept
Definition: FBVector.h:964
template<class T, class Allocator>
static void folly::fbvector< T, Allocator >::swap ( Impl a,
Impl b 
)
inlinestaticprivate

Definition at line 190 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::moveFrom(), and folly::fbvector< HTTPHeaderCode >::swap().

190  {
191  using std::swap;
193  swap(static_cast<Allocator&>(a), static_cast<Allocator&>(b));
194  }
195  a.swapData(b);
196  }
char b
static void swap(Impl &a, Impl &b)
Definition: FBVector.h:190
char a
static const char *const value
Definition: Conv.cpp:50
void swap(fbvector< T, A > &lhs, fbvector< T, A > &rhs) noexcept
Definition: FBVector.h:1697
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::swap ( fbvector< T, Allocator > &  other)
inlinenoexcept

Definition at line 1180 of file FBVector.h.

1181  {
1183  swap(impl_, other.impl_);
1184  } else {
1185  impl_.swapData(other.impl_);
1186  }
folly::fbvector::Impl impl_
static void swap(Impl &a, Impl &b)
Definition: FBVector.h:190
void swapData(Impl &other)
Definition: FBVector.h:136
static const char *const value
Definition: Conv.cpp:50
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::undo_window ( iterator  position,
size_type  n 
)
inlineprivatenoexcept

Definition at line 1362 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::do_real_insert().

1363  {
1364  D_destroy_range_a(position + n, impl_.e_);
1365  impl_.e_ = position;
folly::fbvector::Impl impl_
void D_destroy_range_a(T *first, T *last) noexcept
Definition: FBVector.h:363
template<class T, class Allocator>
void folly::fbvector< T, Allocator >::wrap_frame ( T ledge,
size_type  idx,
size_type  n 
)
inlineprivate

Definition at line 1370 of file FBVector.h.

Referenced by folly::fbvector< HTTPHeaderCode >::do_real_insert().

1371  {
1372  assert(size() >= idx);
1373  assert(n != 0);
1374 
1375  relocate_move(ledge, impl_.b_, impl_.b_ + idx);
1376  try {
1377  relocate_move(ledge + idx + n, impl_.b_ + idx, impl_.e_);
1378  } catch (...) {
1379  relocate_undo(ledge, impl_.b_, impl_.b_ + idx);
1380  throw;
1381  }
1382  relocate_done(ledge, impl_.b_, impl_.b_ + idx);
1383  relocate_done(ledge + idx + n, impl_.b_ + idx, impl_.e_);
folly::fbvector::Impl impl_
void relocate_done(T *, T *first, T *last) noexcept
Definition: FBVector.h:690
void relocate_undo(T *dest, T *first, T *last) noexcept
Definition: FBVector.h:699
size_type size() const noexcept
Definition: FBVector.h:964
void relocate_move(T *dest, T *first, T *last)
Definition: FBVector.h:667

Friends And Related Function Documentation

template<class T, class Allocator>
template<class _T , class _A >
void attach ( fbvector< _T, _A > &  ,
_T *  data,
size_t  sz,
size_t  cap 
)
friend
template<class T, class Allocator>
template<class _T , class _A >
_T* relinquish ( fbvector< _T, _A > &  )
friend

Member Data Documentation

template<class T, class Allocator>
folly::fbvector< T, Allocator >::else
private
Initial value:

Definition at line 343 of file FBVector.h.

template<class T, class Allocator>
folly::fbvector::Impl folly::fbvector< T, Allocator >::impl_
private

Referenced by folly::fbvector< HTTPHeaderCode >::assign(), folly::fbvector< HTTPHeaderCode >::back(), folly::fbvector< HTTPHeaderCode >::begin(), folly::fbvector< HTTPHeaderCode >::capacity(), folly::fbvector< HTTPHeaderCode >::cbegin(), folly::fbvector< HTTPHeaderCode >::cend(), folly::fbvector< HTTPHeaderCode >::clear(), folly::fbvector< HTTPHeaderCode >::D_destroy_range_a(), folly::fbvector< HTTPHeaderCode >::D_uninitialized_copy_a(), folly::fbvector< HTTPHeaderCode >::D_uninitialized_fill_n_a(), folly::fbvector< HTTPHeaderCode >::data(), folly::fbvector< HTTPHeaderCode >::dataIsInternal(), folly::fbvector< HTTPHeaderCode >::do_real_insert(), folly::fbvector< HTTPHeaderCode >::emplace_back(), folly::fbvector< T, Allocator >::emplace_back_aux(), folly::fbvector< HTTPHeaderCode >::empty(), folly::fbvector< HTTPHeaderCode >::end(), folly::fbvector< HTTPHeaderCode >::erase(), folly::fbvector< HTTPHeaderCode >::fbvector(), folly::fbvector< HTTPHeaderCode >::front(), folly::fbvector< HTTPHeaderCode >::get_allocator(), folly::fbvector< HTTPHeaderCode >::insert(), folly::fbvector< HTTPHeaderCode >::M_destroy_range_e(), folly::fbvector< HTTPHeaderCode >::M_relocate(), folly::fbvector< HTTPHeaderCode >::M_uninitialized_copy_e(), folly::fbvector< HTTPHeaderCode >::M_uninitialized_fill_n_e(), folly::fbvector< HTTPHeaderCode >::M_uninitialized_move_e(), folly::fbvector< HTTPHeaderCode >::make_window(), folly::fbvector< HTTPHeaderCode >::moveFrom(), folly::fbvector< HTTPHeaderCode >::operator=(), folly::fbvector< HTTPHeaderCode >::operator[](), folly::fbvector< HTTPHeaderCode >::pop_back(), folly::fbvector< HTTPHeaderCode >::push_back(), folly::fbvector< HTTPHeaderCode >::reserve(), folly::fbvector< HTTPHeaderCode >::reserve_in_place(), folly::fbvector< T, Allocator >::Impl::reset(), folly::fbvector< HTTPHeaderCode >::resize(), folly::fbvector< HTTPHeaderCode >::shrink_to_fit(), folly::fbvector< HTTPHeaderCode >::size(), folly::fbvector< HTTPHeaderCode >::swap(), folly::fbvector< HTTPHeaderCode >::undo_window(), and folly::fbvector< HTTPHeaderCode >::wrap_frame().


The documentation for this class was generated from the following file: