[arithmetic.operations.negate]

# 22 General utilities library [[utilities]](./#utilities)

## 22.10 Function objects [[function.objects]](function.objects#arithmetic.operations.negate)

### 22.10.7 Arithmetic operations [[arithmetic.operations]](arithmetic.operations#negate)

#### 22.10.7.7 Class template negate [arithmetic.operations.negate]

[ð](#lib:negate)

`template<class T = void> struct negate {
  constexpr T operator()(const T& x) const;
};
`

[ð](#lib:operator(),negate)

`constexpr T operator()(const T& x) const;
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L12228)

*Returns*: -x[.](#1.sentence-1)

[ð](#lib:negate%3c%3e)

`template<> struct negate<void> {
  template<class T> constexpr auto operator()(T&& t) const
    -> decltype(-std::forward<T>(t));

  using is_transparent = unspecified;
};
`

[ð](#lib:operator(),negate%3c%3e)

`template<class T> constexpr auto operator()(T&& t) const
    -> decltype(-std::forward<T>(t));
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L12250)

*Returns*: -std​::​forward<T>(t)[.](#2.sentence-1)
