38 template<
typename InputIterator,
typename OutputIterator>
39 void negate(InputIterator first_in, InputIterator last_in, OutputIterator first_out)
41 auto f = [](
const value_type_i<InputIterator>& in) {
return -in; };
42 std::transform(first_in, last_in, first_out, f);
45 template<
typename Container1,
typename Container2>
46 void negate(
const Container1& in, Container2& out)
48 assert(in.size() == out.size());
51 negate(begin(in), end(in), begin(out));
54 template<
typename Container>
55 Container negate(
const Container& in)