Boost C++ 库

...世界上最受推崇和设计精良的 C++ 库项目之一。 Herb SutterAndrei Alexandrescu,《C++ 编码规范

函数运算符- - Boost C++ 函数库
PrevUpHomeNext

函数运算符-

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。


PrevUpHomeNext