我理解容器可以针对noexcept移动构造函数/赋值/交换的类型进行优化。但是有没有实际的原因(除了文档)将其他操作指定为final int activePointerId = mActivePointerId;
if (activePointerId == INVALID_POINTER) {
// If we don't have a valid id, the touch down wasn't on content.
break;
}
final int pointerIndex = MotionEventCompat.findPointerIndex(ev, activePointerId);
final float x = ev.getX(pointerIndex);
final float dx = x - mLastMotionX;
final float xDiff = Math.abs(dx);
final float y = ev.getY(pointerIndex);
final float yDiff = Math.abs(y - mInitialMotionY);
?
具体来说,我感兴趣的是,如果标准库中有优化,可以通过另外noexcept
来获得: