Remove deprecated std::(unary|binary)_function (closes #1201)#1202
Remove deprecated std::(unary|binary)_function (closes #1201)#1202eddelbuettel merged 4 commits intomasterfrom
Conversation
kevinushey
left a comment
There was a problem hiding this comment.
LGTM, but I do wonder if we can just remove the inheritance from unary_function / binary_function altogether, since all those classes are is a bunch of typedefs. E.g. on macOS with libc++:
template <class _Arg, class _Result>
struct _LIBCPP_TEMPLATE_VIS unary_function
{
typedef _Arg argument_type;
typedef _Result result_type;
};
template <class _Arg1, class _Arg2, class _Result>
struct _LIBCPP_TEMPLATE_VIS binary_function
{
typedef _Arg1 first_argument_type;
typedef _Arg2 second_argument_type;
typedef _Result result_type;
};
And since we don't use those typedefs (or pass these along to functions expecting these typedefs) I think it's safe to just remove them.
|
Yep, I hear you. And @Enchufa2 already suggested the same in #1201 (comment). I think I am going to be risk-averse here especially on a hot-fix but if someone has the energy to test this for the next regular (i.e. July) release go for it. The replacement of these two with |
Enchufa2
left a comment
There was a problem hiding this comment.
There's another unary_function in inst/tinytest/cpp/sugar.cpp, and then we should remove the unary-thing also from the vignettes (the sugar and FAQ vignettes contain examples with unary_function).
|
Thanks for the heads-up. I had seen the one in the test file, but then forgot about it. Made the same conditional change. And replaced unconditional in the two markdown files. (One had not been touched in a while and Emacs decided to fiddle with a lot of whitespace so the diff looks bigger there. It isn't. GH has a toggle too for diff disply without whitespace.) rev.dep is about half-way done and looks fine so far. I had ran mostly RcppArmadillo of late so a few build-depends need refreshing and I have a few failed-only-because-xyz-missing. |
Enchufa2
left a comment
There was a problem hiding this comment.
GH has a toggle too for diff disply without whitespace.
Thanks, that's useful, didn't know about it.
LGTM!
|
After the usual reverse-depends checks it got onto CRAN without hickups so merging. |
As discussed in #1201, CRAN would like us to update Rcpp to no longer trigger 'deprecated' warnings under (fairly brandnew) compilers. This PR replaces the use of
std::unary_function()in two files andstd::binary_function()in one.The reverse-depends check is ongoing and as not revealed any issues yet.
R CMD checkstill passes all tests