fix(deprecated): guard from bind and *_function

Deprecated since C++11, removed in C++17.
This commit is contained in:
Johann Dreo 2024-08-23 14:28:34 +02:00
commit b4e89d8f51
3 changed files with 25 additions and 0 deletions

View file

@ -108,7 +108,12 @@ public:
if (is) {
virus.resize(bits.size());
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'));
#endif
}
}