Replace deprecated std::mem_fun and mem_fun_ref with mem_fn...
... which is easier to type and works whether you pass object pointers or references to its operator ().
This commit is contained in:
parent
4d24c0249b
commit
8935fa106f
|
@ -305,6 +305,6 @@ wxArrayString LocalizedStrings(
|
|||
{
|
||||
wxArrayString results;
|
||||
std::transform( strings, strings + nStrings, std::back_inserter(results),
|
||||
std::mem_fun_ref( &IdentInterfaceSymbol::Translation ) );
|
||||
std::mem_fn( &IdentInterfaceSymbol::Translation ) );
|
||||
return results;
|
||||
}
|
||||
|
|
|
@ -600,7 +600,7 @@ struct IteratorRange : public std::pair<Iterator, Iterator> {
|
|||
R2 (C :: * pmf) () const
|
||||
) const
|
||||
{
|
||||
return this->accumulate( init, binary_op, std::mem_fun( pmf ) );
|
||||
return this->accumulate( init, binary_op, std::mem_fn( pmf ) );
|
||||
}
|
||||
|
||||
// Some accumulations frequent enough to be worth abbreviation:
|
||||
|
@ -623,7 +623,7 @@ struct IteratorRange : public std::pair<Iterator, Iterator> {
|
|||
>
|
||||
R min( R2 (C :: * pmf) () const ) const
|
||||
{
|
||||
return this->min( std::mem_fun( pmf ) );
|
||||
return this->min( std::mem_fn( pmf ) );
|
||||
}
|
||||
|
||||
template<
|
||||
|
@ -646,7 +646,7 @@ struct IteratorRange : public std::pair<Iterator, Iterator> {
|
|||
>
|
||||
R max( R2 (C :: * pmf) () const ) const
|
||||
{
|
||||
return this->max( std::mem_fun( pmf ) );
|
||||
return this->max( std::mem_fn( pmf ) );
|
||||
}
|
||||
|
||||
template<
|
||||
|
@ -668,7 +668,7 @@ struct IteratorRange : public std::pair<Iterator, Iterator> {
|
|||
>
|
||||
R sum( R2 (C :: * pmf) () const ) const
|
||||
{
|
||||
return this->sum( std::mem_fun( pmf ) );
|
||||
return this->sum( std::mem_fn( pmf ) );
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ auto ODDecodeFFmpegTask::FromList(const std::list<TrackHolders> &channels) -> St
|
|||
Channels channels;
|
||||
channels.reserve(holders.size());
|
||||
transform(holders.begin(), holders.end(), back_inserter(channels),
|
||||
mem_fun_ref(&TrackHolders::value_type::get)
|
||||
mem_fn(&TrackHolders::value_type::get)
|
||||
);
|
||||
return channels;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue