Skip to content

Commit

Permalink
fix c++2a ambiguity on clang10 with operator== issue #132 (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffGarland committed Mar 23, 2020
1 parent 44618f1 commit 4a46476
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/boost/date_time/gregorian/greg_date.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,18 @@ namespace gregorian {
return date(ymd.year, ymd.month, eom_day);
}

friend BOOST_CXX14_CONSTEXPR
bool operator==(const date& lhs, const date& rhs);

private:

};

inline BOOST_CXX14_CONSTEXPR
bool operator==(const date& lhs, const date& rhs)
{
return lhs.days_ == rhs.days_;
}


} } //namespace gregorian
Expand Down
8 changes: 8 additions & 0 deletions include/boost/date_time/posix_time/ptime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,16 @@ namespace posix_time {
{}
#endif // DATE_TIME_NO_DEFAULT_CONSTRUCTOR

friend BOOST_CXX14_CONSTEXPR
bool operator==(const ptime& lhs, const ptime& rhs);

};

inline BOOST_CXX14_CONSTEXPR
bool operator==(const ptime& lhs, const ptime& rhs)
{
return ptime::time_system_type::is_equal(lhs.time_,rhs.time_);
}


} }//namespace posix_time
Expand Down

0 comments on commit 4a46476

Please sign in to comment.