1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
std::tuple<int, int, int> date1 {/*year*/, /*month*/, /*day*/};
std::tuple<int, int, double> time1 {/*hour*/, /*minute*/, /*second*/};
std::tuple<int, int, int> date2 {/*year, /*month*/, /*day*/};
std::tuple<int, int, double> time2 {/*hour, /*minute*/, /*second*/};
if(date1 < date2)
{
//...
}
if(time1 < time2)
{
//...
}
if(std::tie(date1, time1) < std::tie(date2, time2))
{
//...
}
|