Skip to content

Commit

Permalink
Make ratio_gcd a template alias for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Oct 27, 2023
1 parent a259a0e commit bced402
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 4 additions & 4 deletions include/boost/ratio/ratio.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ time2_demo contained this comment:
namespace boost
{

template <class R1, class R2> struct ratio_gcd: ratio<
// extension used by Chrono

template <class R1, class R2> using ratio_gcd = typename ratio<
ratio_detail::gcd<R1::num, R2::num>::value,
ratio_detail::lcm<R1::den, R2::den>::value>::type
{
};
ratio_detail::lcm<R1::den, R2::den>::value>::type;

} // namespace boost

Expand Down
4 changes: 0 additions & 4 deletions include/boost/ratio/ratio_fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ using std::ratio_subtract;
using std::ratio_multiply;
using std::ratio_divide;

// extension used by Chrono
template <class R1, class R2> struct ratio_gcd;
// template <class R1, class R2> struct ratio_lcm;

// ratio comparison
using std::ratio_equal;
using std::ratio_not_equal;
Expand Down

0 comments on commit bced402

Please sign in to comment.