...世界上最受推崇和设计精良的 C++ 库项目之一。 — Herb Sutter 和 Andrei Alexandrescu,《C++ 编码规范
...世界上最受推崇和设计精良的 C++ 库项目之一。
boost::posix_time::operator-
// In header: <boost/date_time/posix_time/date_duration_operators.hpp> BOOST_CXX14_CONSTEXPR ptime operator-(const ptime & t, const boost::gregorian::years & y);
减去一个 years 对象和一个 ptime。结果将与 ptime 具有相同的月份和月份中的日期,除非原始日期是该月的最后一天。有关更多详细信息,请参阅 date_time::years_duration。