In file included from /usr/include/c++/5/bits/stl_function.h:1128:0,
from /usr/include/c++/5/string:48,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from prog.cpp:2:
/usr/include/c++/5/backward/binders.h: In instantiation of 'typename _Operation::result_type std::binder1st<_Operation>::operator()(typename _Operation::second_argument_type&) const [with _Operation = Add; typename _Operation::result_type = int; typename _Operation::second_argument_type = int]':
/usr/include/c++/5/bits/stl_algo.h:4175:24: required from '_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; _OIter = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; _UnaryOperation = std::binder1st<Add>]'
prog.cpp:17:71: required from here
/usr/include/c++/5/backward/binders.h:129:29: error: no match for call to '(const Add) (const first_argument_type&, std::binary_function<int, int, int>::second_argument_type&)'
{ return op(value, __x); }
^
prog.cpp:7:13: note: candidate: int Add::operator()(int&, const int&) const <near match>
int operator()(int & _Left, const int & _Right) const//LINE I
^
prog.cpp:7:13: note: conversion of argument 1 would be ill-formed:
In file included from /usr/include/c++/5/bits/stl_function.h:1128:0,
from /usr/include/c++/5/string:48,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from prog.cpp:2:
/usr/include/c++/5/backward/binders.h:129:29: error: binding 'const first_argument_type {aka const int}' to reference of type 'int&' discards qualifiers
{ return op(value, __x); }
^