Skip to content

Commit 942a009

Browse files
committed
Use auto with concept / trailing return
1 parent e839344 commit 942a009

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

include/boost/decimal/gcc_decimal32.hpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -79,42 +79,42 @@ BOOST_DECIMAL_EXPORT class gcc_decimal32 final
7979

8080
// 3.2.8 Binary arithmetic operators.
8181
template <typename Integral>
82-
friend return_type operator+(gcc_decimal32 lhs, Integral rhs)
82+
friend auto operator+(gcc_decimal32 lhs, Integral rhs)
8383
BOOST_DECIMAL_REQUIRES_RETURN(detail::is_integral_v, Integral, return_type)
8484
{ return lhs.underlying() + rhs; }
8585

8686
template <typename Integral>
87-
friend return_type operator+(Integral lhs, gcc_decimal32 rhs)
87+
friend auto operator+(Integral lhs, gcc_decimal32 rhs)
8888
BOOST_DECIMAL_REQUIRES_RETURN(detail::is_integral_v, Integral, return_type)
8989
{ return lhs + rhs.underlying(); }
9090

9191
template <typename Integral>
92-
friend return_type operator-(gcc_decimal32 lhs, Integral rhs)
92+
friend auto operator-(gcc_decimal32 lhs, Integral rhs)
9393
BOOST_DECIMAL_REQUIRES_RETURN(detail::is_integral_v, Integral, return_type)
9494
{ return lhs.underlying() - rhs; }
9595

9696
template <typename Integral>
97-
friend return_type operator-(Integral lhs, gcc_decimal32 rhs)
97+
friend auto operator-(Integral lhs, gcc_decimal32 rhs)
9898
BOOST_DECIMAL_REQUIRES_RETURN(detail::is_integral_v, Integral, return_type)
9999
{ return lhs - rhs.underlying(); }
100100

101101
template <typename Integral>
102-
friend return_type operator*(gcc_decimal32 lhs, Integral rhs)
102+
friend auto operator*(gcc_decimal32 lhs, Integral rhs)
103103
BOOST_DECIMAL_REQUIRES_RETURN(detail::is_integral_v, Integral, return_type)
104104
{ return lhs.underlying() * rhs; }
105105

106106
template <typename Integral>
107-
friend return_type operator*(Integral lhs, gcc_decimal32 rhs)
107+
friend auto operator*(Integral lhs, gcc_decimal32 rhs)
108108
BOOST_DECIMAL_REQUIRES_RETURN(detail::is_integral_v, Integral, return_type)
109109
{ return lhs * rhs.underlying(); }
110110

111111
template <typename Integral>
112-
friend return_type operator/(gcc_decimal32 lhs, Integral rhs)
112+
friend auto operator/(gcc_decimal32 lhs, Integral rhs)
113113
BOOST_DECIMAL_REQUIRES_RETURN(detail::is_integral_v, Integral, return_type)
114114
{ return lhs.underlying() / rhs; }
115115

116116
template <typename Integral>
117-
friend return_type operator/(Integral lhs, gcc_decimal32 rhs)
117+
friend auto operator/(Integral lhs, gcc_decimal32 rhs)
118118
BOOST_DECIMAL_REQUIRES_RETURN(detail::is_integral_v, Integral, return_type)
119119
{ return lhs / rhs.underlying(); }
120120
};

0 commit comments

Comments
 (0)