explicit cast to BaseState size_type