vec_int32_capacity Function

private pure function vec_int32_capacity(self) result(n)

Elements that fit before the next reallocation.

Type Bound

vector_int32_t

Arguments

Type IntentOptional Attributes Name
class(vector_int32_t), intent(in) :: self

Return Value integer(kind=default_int)


Called by

proc~~vec_int32_capacity~~CalledByGraph proc~vec_int32_capacity vector_int32_t%vec_int32_capacity proc~vec_int32_append vector_int32_t%vec_int32_append proc~vec_int32_append->proc~vec_int32_capacity proc~vec_int32_grow vec_int32_grow proc~vec_int32_append->proc~vec_int32_grow proc~vec_int32_grow->proc~vec_int32_capacity proc~vec_int32_push_back vector_int32_t%vec_int32_push_back proc~vec_int32_push_back->proc~vec_int32_capacity proc~vec_int32_push_back->proc~vec_int32_grow proc~vec_int32_resize vector_int32_t%vec_int32_resize proc~vec_int32_resize->proc~vec_int32_capacity proc~vec_int32_resize->proc~vec_int32_grow proc~vec_int32_shrink_to_fit vector_int32_t%vec_int32_shrink_to_fit proc~vec_int32_shrink_to_fit->proc~vec_int32_capacity proc~vec_int32_take vector_int32_t%vec_int32_take proc~vec_int32_take->proc~vec_int32_capacity proc~vec_int32_take->proc~vec_int32_shrink_to_fit proc~vec_int32_reserve vector_int32_t%vec_int32_reserve proc~vec_int32_reserve->proc~vec_int32_grow

Source Code

   pure function vec_int32_capacity(self) result(n)
      !! Elements that fit before the next reallocation.
      class(vector_int32_t), intent(in) :: self
      integer(default_int) :: n

      if (allocated(self%items)) then
         n = size(self%items, kind=default_int)
      else
         n = 0
      end if
   end function vec_int32_capacity