mirror of https://github.com/CGAL/cgal
replace bind in STL_extension
This commit is contained in:
parent
0d16ef14c5
commit
cef46c9ee6
|
|
@ -14,8 +14,7 @@ int main()
|
||||||
std::cout << "min_odd = "
|
std::cout << "min_odd = "
|
||||||
<< *CGAL::min_element_if(v.begin(),
|
<< *CGAL::min_element_if(v.begin(),
|
||||||
v.end(),
|
v.end(),
|
||||||
CGAL::compose1_1(boost::bind2nd(std::greater< int >(), 0),
|
[](int i){ return (i%2) > 0; })
|
||||||
boost::bind2nd(std::modulus< int >(), 2)))
|
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,6 @@ using CGAL::compose1_2;
|
||||||
using CGAL::compose2_1;
|
using CGAL::compose2_1;
|
||||||
using CGAL::compose2_2;
|
using CGAL::compose2_2;
|
||||||
using CGAL::compare_to_less;
|
using CGAL::compare_to_less;
|
||||||
using boost::binder1st;
|
|
||||||
using boost::bind1st;
|
|
||||||
using std::accumulate;
|
using std::accumulate;
|
||||||
using std::plus;
|
using std::plus;
|
||||||
using std::multiplies;
|
using std::multiplies;
|
||||||
|
|
@ -31,8 +29,8 @@ int main()
|
||||||
{
|
{
|
||||||
plus< int > pl;
|
plus< int > pl;
|
||||||
multiplies< int > mu;
|
multiplies< int > mu;
|
||||||
binder1st< plus< int > > op1 = bind1st(pl, 1);
|
auto op1 = [](int i){ return i+1; };
|
||||||
binder1st< multiplies< int > > op2 = bind1st(mu, 2);
|
auto op2 = [](int i){ return i * 2; };
|
||||||
|
|
||||||
// compose1_2:
|
// compose1_2:
|
||||||
int a[] = {3,5,7,2,4};
|
int a[] = {3,5,7,2,4};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue