std::chrono::duration::operator++, std::chrono::duration::operator--
提供:cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| duration& operator++(); |
(1) | |
| duration operator++(int); |
(2) | |
| duration& operator--(); |
(3) | |
| duration operator--(int); |
(4) | |
インクリメントまたはデクリメントし、この期間の刻みの数.
Original:
Increments or decrements the number of ticks for this duration.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
rep_は、持続オブジェクト内のタイマ刻み数を保持しているメンバ変数である場合 Original:
If
rep_ is a member variable holding the number of ticks in a duration object, The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
1)
++rep_; return *this;に相当する
Original:
Equivalent to ++rep_; return *this;
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
2)
return duration(rep_++)に相当する
Original:
Equivalent to return duration(rep_++)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
3)
--rep_; return *this;に相当する
Original:
Equivalent to --rep_; return *this;
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
4)
return duration(rep_--);に相当する
Original:
Equivalent to return duration(rep_--);
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
目次 |
[編集] パラメータ
(なし)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[編集] 値を返します
@ 1,3 @変更後のこの期間を参照する
Original:
@1,3@ a reference to this duration after modification
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
@ 2,4 @修正前に作成期間のコピー
Original:
@2,4@ a copy of the duration made before modification
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[編集] 例
#include <chrono> #include <iostream> int main() { std::chrono::hours h(1); std::chrono::minutes m = ++h; m--; std::cout << m.count() << " minutes\n"; }
Output:
119 minutes
[編集] も参照してください
| 2期間の間に複合代入を実装しています Original: implements compound assignment between two durations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
| 引数として期間との間で演算を実装しています Original: implements arithmetic operations with durations as arguments The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |