当前位置: 首页>>代码示例>>C++>>正文


C++ period::end方法代码示例

本文整理汇总了C++中period::end方法的典型用法代码示例。如果您正苦于以下问题:C++ period::end方法的具体用法?C++ period::end怎么用?C++ period::end使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在period的用法示例。


在下文中一共展示了period::end方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: return

 inline
 bool 
 period<point_rep,duration_rep>::is_adjacent(const period<point_rep,duration_rep>& other) const 
 {
   return (other.begin() == end() ||
           begin_ == other.end());
 }
开发者ID:,项目名称:,代码行数:7,代码来源:

示例2: start

 inline
 period<point_rep,duration_rep>
 period<point_rep,duration_rep>::span(const period<point_rep,duration_rep>& other) const 
 {
   point_rep start((begin_ < other.begin_) ? begin() : other.begin());
   point_rep newend((last_  < other.last_)  ? other.end() : this->end());
   return period<point_rep,duration_rep>(start, newend);
 }
开发者ID:,项目名称:,代码行数:8,代码来源:

示例3:

 inline
 period<point_rep,duration_rep>
 period<point_rep,duration_rep>::intersection(const period<point_rep,duration_rep>& other) const 
 {
   if (begin_ > other.begin_) {
     if (last_ <= other.last_) { //case2
       return *this;  
     }
     //case 1
     return period<point_rep,duration_rep>(begin_, other.end());
   }
   else {
     if (last_ <= other.last_) { //case3
       return period<point_rep,duration_rep>(other.begin_, this->end());
     }
     //case4
     return other;
   }
   //unreachable
 }
开发者ID:,项目名称:,代码行数:20,代码来源:

示例4: start

 /// Allow periods to be compared for equality
 bool operator==(const period<void> &p) const {
     return start() == p.start() && end() == p.end();
 }
开发者ID:KayEss,项目名称:fost-base,代码行数:4,代码来源:period.hpp


注:本文中的period::end方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。