fix(deprecated): guard from bind and *_function
Deprecated since C++11, removed in C++17.
This commit is contained in:
parent
09a26fdc62
commit
b4e89d8f51
3 changed files with 25 additions and 0 deletions
|
|
@ -108,7 +108,12 @@ public:
|
||||||
if (is) {
|
if (is) {
|
||||||
virus.resize(bits.size());
|
virus.resize(bits.size());
|
||||||
std::transform(bits.begin(), bits.end(), virus.begin(),
|
std::transform(bits.begin(), bits.end(), virus.begin(),
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
std::bind(std::equal_to<char>(), std::placeholders::_1, '1'));
|
||||||
|
#else
|
||||||
|
// Deprecated since C++11.
|
||||||
std::bind2nd(std::equal_to<char>(), '1'));
|
std::bind2nd(std::equal_to<char>(), '1'));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,12 @@ eoFunctorBase::procedure_tag functor_category(const eoF<R>&)
|
||||||
result_type
|
result_type
|
||||||
**/
|
**/
|
||||||
template <class A1, class R>
|
template <class A1, class R>
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
class eoUF : public eoFunctorBase, public std::function<R(A1)>
|
||||||
|
#else
|
||||||
|
// Deprecated in C++11
|
||||||
class eoUF : public eoFunctorBase, public std::unary_function<A1, R>
|
class eoUF : public eoFunctorBase, public std::unary_function<A1, R>
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
|
|
||||||
|
|
@ -151,7 +156,12 @@ eoFunctorBase::unary_function_tag functor_category(const eoUF<A1, R>&)
|
||||||
result_type
|
result_type
|
||||||
**/
|
**/
|
||||||
template <class A1, class A2, class R>
|
template <class A1, class A2, class R>
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
class eoBF : public eoFunctorBase, public std::function<R(A1, A2)>
|
||||||
|
#else
|
||||||
|
// Deprecated in C++11
|
||||||
class eoBF : public eoFunctorBase, public std::binary_function<A1, A2, R>
|
class eoBF : public eoFunctorBase, public std::binary_function<A1, A2, R>
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
/// virtual dtor here so there is no need to define it in derived classes
|
/// virtual dtor here so there is no need to define it in derived classes
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,12 @@ void eoSTLF<void>::operator()(void)
|
||||||
respectively
|
respectively
|
||||||
*/
|
*/
|
||||||
template <class A1, class R>
|
template <class A1, class R>
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
class eoSTLUF : public std::function<R(A1)>
|
||||||
|
#else
|
||||||
|
// Deprecated since C++11
|
||||||
class eoSTLUF : public std::unary_function<A1, R>
|
class eoSTLUF : public std::unary_function<A1, R>
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
eoSTLUF(eoUF<A1,R>& _f) : f(_f) {}
|
eoSTLUF(eoUF<A1,R>& _f) : f(_f) {}
|
||||||
|
|
@ -102,7 +107,12 @@ class eoSTLUF : public std::unary_function<A1, R>
|
||||||
respectively
|
respectively
|
||||||
*/
|
*/
|
||||||
template <class A1, class A2, class R>
|
template <class A1, class A2, class R>
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
class eoSTLBF : public std::function<R(A1, A2)>
|
||||||
|
#else
|
||||||
|
// Deprecated since C++11
|
||||||
class eoSTLBF : public std::binary_function<A1, A2, R>
|
class eoSTLBF : public std::binary_function<A1, A2, R>
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
eoSTLBF(eoUF<A1,R>& _f) : f(_f) {}
|
eoSTLBF(eoUF<A1,R>& _f) : f(_f) {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue