GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::chrono::duration::operator++,(3) C++ Standard Libary std::chrono::duration::operator++,(3)

std::chrono::duration::operator++, - std::chrono::duration::operator++,


duration& operator++(); (until
C++17)
constexpr duration& (since
operator++(); C++17)
duration operator++(int); (until
C++17)
constexpr duration (since
operator++(int); (1) C++17)
duration& operator--(); (until
(2) C++17)
constexpr duration& (since
operator--(); (3) C++17)
duration operator--(int); (until
(4) C++17)
constexpr duration (since
operator--(int); C++17)


Increments or decrements the number of ticks for this duration.


If rep_ is a member variable holding the number of ticks in a duration object,


1) Equivalent to ++rep_; return *this;
2) Equivalent to return duration(rep_++)
3) Equivalent to --rep_; return *this;
4) Equivalent to return duration(rep_--);


(none)


1,3) a reference to this duration after modification
2,4) a copy of the duration made before modification

// Run this code


#include <chrono>
#include <iostream>


int main()
{
std::chrono::hours h(1);
std::chrono::minutes m = ++h;
m--;
std::cout << m.count() << " minutes\n";
}


119 minutes


operator+=
operator-= implements compound assignment between two durations
operator*= (public member function)
operator/=
operator%=
operator+
operator-
operator* implements arithmetic operations with durations as arguments
operator/ (function template)
operator%
(C++11)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.