21 #ifndef ASAP_LITERALS_H 22 #define ASAP_LITERALS_H 29 inline static asap::year operator"" _year(
long double v) {
return asap::year(static_cast<double>(v)); }
32 inline static asap::years operator"" _years(
unsigned long long v) {
return asap::years(static_cast<double>(v)); }
33 inline static asap::year operator"" _year(
unsigned long long v) {
return asap::year(static_cast<double>(v)); }
34 inline static asap::years operator"" _yrs(
unsigned long long v) {
return asap::years(static_cast<double>(v)); }
35 inline static asap::years operator"" _Y(
unsigned long long v) {
return asap::years(static_cast<double>(v)); }
42 inline static asap::month operator"" _month(
unsigned long long v) {
return asap::month(static_cast<double>(v)); }
43 inline static asap::months operator"" _mon(
unsigned long long v) {
return asap::month(static_cast<double>(v)); }
46 inline static asap::days operator"" _days(
long double v) {
return asap::days(static_cast<double>(v)); }
47 inline static asap::day operator"" _day(
long double v) {
return asap::day(static_cast<double>(v)); }
48 inline static asap::days operator"" _d(
long double v) {
return asap::day(static_cast<double>(v)); }
49 inline static asap::days operator"" _days(
unsigned long long v) {
return asap::days(static_cast<double>(v)); }
50 inline static asap::day operator"" _day(
unsigned long long v) {
return asap::day(static_cast<double>(v)); }
51 inline static asap::days operator"" _d(
unsigned long long v) {
return asap::day(static_cast<double>(v)); }
54 inline static asap::hour operator"" _hour(
long double v) {
return asap::hour(static_cast<double>(v)); }
57 inline static asap::hours operator"" _hours(
unsigned long long v) {
return asap::hours(static_cast<double>(v)); }
58 inline static asap::hour operator"" _hour(
unsigned long long v) {
return asap::hour(static_cast<double>(v)); }
59 inline static asap::hours operator"" _hrs(
unsigned long long v) {
return asap::hours(static_cast<double>(v)); }
60 inline static asap::hours operator"" _H(
unsigned long long v) {
return asap::hours(static_cast<double>(v)); }
82 #endif //ASAP_LITERALS_H duration< SECONDS_IN_HOUR > hours
A duration specified in hours.
duration< 1 > seconds
A duration specified in seconds.
months month
A duration specified in months (30 days)
duration< SECONDS_IN_MINUTE > minutes
A duration specified in minutes.
seconds second
A duration specified in seconds.
duration< SECONDS_IN_DAY > days
A duration specified in days.
minutes minute
A duration specified in minutes.
duration< SECONDS_IN_YEAR > years
A duration specified in years.
duration< SECONDS_IN_MONTH > months
A duration specified in months (30 days)
The asap::duration class exposes methods to create, manipulate and print durations.
hours hour
A duration specified in hours.
days day
A duration specified in days.
years year
A duration specified in years.