mirror of
https://github.com/boostorg/date_time.git
synced 2026-02-22 15:22:15 +00:00
change merge_inclusive to hull
[SVN r19662]
This commit is contained in:
@@ -80,7 +80,7 @@ namespace date_time {
|
||||
bool is_after(const point_rep& point) const;
|
||||
period intersection(const period& other) const;
|
||||
period merge(const period& other) const;
|
||||
period merge_inclusive(const period& other) const;
|
||||
period hull(const period& other) const;
|
||||
private:
|
||||
point_rep begin_;
|
||||
point_rep last_;
|
||||
@@ -320,7 +320,7 @@ namespace date_time {
|
||||
return period<point_rep,duration_rep>(begin_,begin_); // no intersect return null
|
||||
}
|
||||
|
||||
//! Same as merge for intersecting periods, inclusive merge otherwise.
|
||||
//! Combine two periods with earliest start and latest end.
|
||||
/*! Combines two periods and any gap between them such that
|
||||
* start = min(p1.start, p2.start)
|
||||
* end = max(p1.end , p2.end)
|
||||
@@ -334,12 +334,11 @@ namespace date_time {
|
||||
template<class point_rep, class duration_rep>
|
||||
inline
|
||||
period<point_rep,duration_rep>
|
||||
period<point_rep,duration_rep>::merge_inclusive(const period<point_rep,duration_rep>& other) const
|
||||
period<point_rep,duration_rep>::hull(const period<point_rep,duration_rep>& other) const
|
||||
{
|
||||
point_rep start = min(begin_, other.begin_);
|
||||
point_rep last = max(end(), other.end());
|
||||
return period<point_rep,duration_rep>(start, last);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user