50 lines
1.2 KiB
Markdown
50 lines
1.2 KiB
Markdown
[bitwise.operations.not]
|
||
|
||
# 22 General utilities library [[utilities]](./#utilities)
|
||
|
||
## 22.10 Function objects [[function.objects]](function.objects#bitwise.operations.not)
|
||
|
||
### 22.10.11 Bitwise operations [[bitwise.operations]](bitwise.operations#not)
|
||
|
||
#### 22.10.11.5 Class template bit_not [bitwise.operations.not]
|
||
|
||
[ð](#itemdecl:1)
|
||
|
||
`template<class T = void> struct bit_not {
|
||
constexpr T operator()(const T& x) const;
|
||
};
|
||
`
|
||
|
||
[ð](#lib:operator(),bit_not)
|
||
|
||
`constexpr T operator()(const T& x) const;
|
||
`
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L13075)
|
||
|
||
*Returns*: ~x[.](#1.sentence-1)
|
||
|
||
[ð](#lib:bit_not%3c%3e)
|
||
|
||
`template<> struct bit_not<void> {
|
||
template<class T> constexpr auto operator()(T&& t) const
|
||
-> decltype(~std::forward<T>(t));
|
||
|
||
using is_transparent = unspecified;
|
||
};
|
||
`
|
||
|
||
[ð](#lib:operator(),bit_not%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#L13097)
|
||
|
||
*Returns*: ~std::forward<T>(t)[.](#2.sentence-1)
|