以最小的努力从noexcept中获利

时间:2015-07-16 16:39:51

标签: c++ c++11 noexcept

我理解容器可以针对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来获得:

  1. 默认构造函数
  2. 复制构造函数
  3. 复制作业

0 个答案:

没有答案