You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the context of vectors, the std::vector class refers to the size type as unsigned integer type (usually std::size_t). vector_size_t type variables are also used as an index into the vector. And it doesn't quite make sense to allow this to be negative.
I'm sure there was a reason at some point to use signed it. The comment says this type was created to unify the usage so it wouldn't be uint32_t and int32_t all over the place. But why was it not uint32_t in the first place?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The
vector_type_t
is defined asint32_t
velox/velox/vector/TypeAliases.h
Line 29 in 4cffa4b
In the context of vectors, the
std::vector
class refers to the size type as unsigned integer type (usually std::size_t).vector_size_t
type variables are also used as an index into the vector. And it doesn't quite make sense to allow this to be negative.I'm sure there was a reason at some point to use signed it. The comment says this type was created to unify the usage so it wouldn't be uint32_t and int32_t all over the place. But why was it not uint32_t in the first place?
Beta Was this translation helpful? Give feedback.
All reactions