@@ -31,7 +31,7 @@ inline fvar<T> operator/(const fvar<T>& x1, const fvar<T>& x2) {
3131 * @param x2 second argument
3232 * @return first argument divided by second argument
3333 */
34- template <typename T, typename U, require_arithmetic_t <U>... >
34+ template <typename T, typename U, require_arithmetic_t <U>* = nullptr >
3535inline fvar<T> operator /(const fvar<T>& x1, U x2) {
3636 return fvar<T>(x1.val_ / x2, x1.d_ / x2);
3737}
@@ -44,7 +44,7 @@ inline fvar<T> operator/(const fvar<T>& x1, U x2) {
4444 * @param x2 second argument
4545 * @return first argument divided by second argument
4646 */
47- template <typename T, typename U, require_arithmetic_t <U>... >
47+ template <typename T, typename U, require_arithmetic_t <U>* = nullptr >
4848inline fvar<T> operator /(U x1, const fvar<T>& x2) {
4949 return fvar<T>(x1 / x2.val_ , -x1 * x2.d_ / (x2.val_ * x2.val_ ));
5050}
@@ -54,7 +54,7 @@ inline std::complex<fvar<T>> operator/(const std::complex<fvar<T>>& x1,
5454 const std::complex <fvar<T>>& x2) {
5555 return internal::complex_divide (x1, x2);
5656}
57- template <typename T, typename U, require_arithmetic_t <U>... >
57+ template <typename T, typename U, require_arithmetic_t <U>* = nullptr >
5858inline std::complex <fvar<T>> operator /(const std::complex <fvar<T>>& x1,
5959 const std::complex <U>& x2) {
6060 return internal::complex_divide (x1, x2);
@@ -64,17 +64,17 @@ inline std::complex<fvar<T>> operator/(const std::complex<fvar<T>>& x1,
6464 const fvar<T>& x2) {
6565 return internal::complex_divide (x1, x2);
6666}
67- template <typename T, typename U, require_arithmetic_t <U>... >
67+ template <typename T, typename U, require_arithmetic_t <U>* = nullptr >
6868inline std::complex <fvar<T>> operator /(const std::complex <fvar<T>>& x1, U x2) {
6969 return internal::complex_divide (x1, x2);
7070}
7171
72- template <typename T, typename U, require_arithmetic_t <U>... >
72+ template <typename T, typename U, require_arithmetic_t <U>* = nullptr >
7373inline std::complex <fvar<T>> operator /(const std::complex <U>& x1,
7474 const std::complex <fvar<T>>& x2) {
7575 return internal::complex_divide (x1, x2);
7676}
77- template <typename T, typename U, require_arithmetic_t <U>... >
77+ template <typename T, typename U, require_arithmetic_t <U>* = nullptr >
7878inline std::complex <fvar<T>> operator /(const std::complex <U>& x1,
7979 const fvar<T>& x2) {
8080 return internal::complex_divide (x1, x2);
@@ -92,7 +92,7 @@ inline std::complex<fvar<T>> operator/(const fvar<T>& x1,
9292 return internal::complex_divide (x1, x2);
9393}
9494
95- template <typename T, typename U, require_arithmetic_t <U>... >
95+ template <typename T, typename U, require_arithmetic_t <U>* = nullptr >
9696inline std::complex <fvar<T>> operator /(U x1, const std::complex <fvar<T>>& x2) {
9797 return internal::complex_divide (x1, x2);
9898}
0 commit comments