22//
33// mapply_2.h: Rcpp R/C++ interface class library -- mapply_2
44//
5- // Copyright (C) 2012 Dirk Eddelbuettel and Romain Francois
5+ // Copyright (C) 2012 - 2024 Dirk Eddelbuettel and Romain Francois
6+ // Copyright (C) 2025 Dirk Eddelbuettel, Romain Francois and Iñaki Ucar
67//
78// This file is part of Rcpp.
89//
@@ -32,13 +33,13 @@ template <int RTYPE,
3233>
3334class Mapply_2 : public VectorBase <
3435 Rcpp::traits::r_sexptype_traits<
35- typename ::Rcpp::traits::result_of<Function>::type
36+ typename ::Rcpp::traits::result_of<Function, T_1, T_2 >::type
3637 >::rtype ,
3738 true ,
3839 Mapply_2<RTYPE,NA_1,T_1,NA_2,T_2,Function>
3940> {
4041public:
41- typedef typename ::Rcpp::traits::result_of<Function>::type result_type ;
42+ typedef typename ::Rcpp::traits::result_of<Function, T_1, T_2 >::type result_type ;
4243
4344 Mapply_2 ( const T_1& vec_1_, const T_2& vec_2_, Function fun_ ) :
4445 vec_1 (vec_1_), vec_2(vec_2_), fun(fun_){}
@@ -62,14 +63,14 @@ template <int RTYPE,
6263class Mapply_2_Vector_Primitive : public
6364 VectorBase<
6465 Rcpp::traits::r_sexptype_traits<
65- typename ::Rcpp::traits::result_of<Function>::type
66+ typename ::Rcpp::traits::result_of<Function, T_1 >::type
6667 >::rtype ,
6768 true ,
6869 Mapply_2_Vector_Primitive<RTYPE,NA_1,T_1,PRIM_2,Function>
6970 >
7071{
7172public:
72- typedef typename ::Rcpp::traits::result_of<Function>::type result_type ;
73+ typedef typename ::Rcpp::traits::result_of<Function, T_1 >::type result_type ;
7374
7475 Mapply_2_Vector_Primitive ( const T_1& vec_1_, PRIM_2 prim_2_, Function fun_ ) :
7576 vec_1 (vec_1_), prim_2(prim_2_), fun(fun_){}
@@ -93,14 +94,14 @@ template <int RTYPE,
9394class Mapply_2_Primitive_Vector : public
9495 VectorBase<
9596 Rcpp::traits::r_sexptype_traits<
96- typename ::Rcpp::traits::result_of<Function>::type
97+ typename ::Rcpp::traits::result_of<Function, T_2 >::type
9798 >::rtype ,
9899 true ,
99100 Mapply_2_Primitive_Vector<RTYPE,PRIM_1,NA_2,T_2,Function>
100101 >
101102{
102103public:
103- typedef typename ::Rcpp::traits::result_of<Function>::type result_type ;
104+ typedef typename ::Rcpp::traits::result_of<Function, T_2 >::type result_type ;
104105
105106 Mapply_2_Primitive_Vector ( PRIM_1 prim_1_, const T_2& vec_2_, Function fun_ ) :
106107 prim_1 (prim_1_), vec_2(vec_2_), fun(fun_){}
0 commit comments