std::minus<void>
cppreference.com
<tbody>
</tbody>
template<> class minus<void>; |
( C++14) | |
std::minus<> std::minus .
is_transparent
|
/* */ |
-
| (public -) |
std::minus<>::operator()
<tbody> </tbody> template< class T, class U> constexpr auto operator()( T&& lhs, U&& rhs ) const -> decltype(std::forward<T>(lhs) - std::forward<U>(rhs)); |
||
rhs lhs ( operator-, )
| lhs, rhs |
e
lhs - rhs.
is_transparent , : , , rvalue. , , std::set::find std::set::lower_bound , Compare.
#include <complex>
#include <functional>
#include <iostream>
int main()
{
constexpr std::complex<int> z(4, 2);
std::cout << std::minus<>{}(z, 1) << ' ' << (z - 1) << '\n';
}
:
(3,2) (3,2)