Deprecated std::binder2nd in parallel/algo.h
Paolo Carlini
paolo.carlini@oracle.com
Mon Sep 30 17:36:00 GMT 2013
On 09/30/2013 02:05 PM, Jonathan Wakely wrote:
> On 29 September 2013 17:11, Morwenn Ed wrote:
>> Since it is possible to call g++ with -D_GLIBCXX_USE_DEPRECATED=0, we should probably
>> get rid of the dependence of deprecated features in the rest of the library; that would
>> ensure the usability of _GLIBCXX_USE_DEPRECATED.
>>
>> I found std::binder2nd still used in parallel/algo.h (line 153) which could probably be
>> replaced by __gnu_parallel::__binder2nd since the function exists and is still compiled
>> when _GLIBCXX_USE_DEPRECATED is set to 0.
> I agree that looks like a good idea.
Thus I mean to test/apply this sort of patchlet.
Paolo.
//////////////////
-------------- next part --------------
Index: algo.h
===================================================================
--- algo.h (revision 203034)
+++ algo.h (working copy)
@@ -150,7 +150,9 @@
if (_GLIBCXX_PARALLEL_CONDITION(true))
{
- std::binder2nd<__gnu_parallel::_EqualTo<_ValueType, const _Tp&> >
+ __gnu_parallel::__binder2nd<__gnu_parallel::_EqualTo<_ValueType,
+ const _Tp&>,
+ _ValueType, _ValueType, bool>
__comp(__gnu_parallel::_EqualTo<_ValueType, const _Tp&>(), __val);
return __gnu_parallel::__find_template(
__begin, __end, __begin, __comp,
More information about the Libstdc++
mailing list