Closed Predelnik closed 5 years ago
Thanks @Predelnik.
Forgive my ignorance... Will C++03 remain happy? We still see it in the field, like on Red Hat servers with GCC 4.8 (hard to believe in 2018...).
Yes it should be fine by C++03 since this function object is used only as an argument to std::transform
. This inheritance could matter only in complex cases like using std::not1 (ByteToLower ())
for example. But even for such cases it could be replaced with direct typedef
s for argument_type
and result_type
without inheriting.
More info here: https://en.cppreference.com/w/cpp/utility/functional/unary_function
Thanks @Predelnik. Merged.
std::unary_function
was removed in C++20. Since it may be required only by function object adapters such asstd::not1
, base class should not matter in this case.