Skip to content
Prev 5345 / 10988 Next

[Rcpp-devel] Conversion operator for Rcpp::internal::generic_proxy (Previously Efficient DataFrame access by row & column)

I have posted a question on stack about the issue, a long with some more details on the problem

http://stackoverflow.com/questions/14987326/overloading-conversion-operator-template

Also I saw in the source of Rcpp, there is a comment says that the operator int and operator bool are provided to help compilers. I am curious in what situations that a single operator 
template is not enough. Since the operator actually simply call Rcpp::as

I have some thoughts on this issue. At the heart of the problem is that the compilers do not consider the operator template as a perfect match. The only reason I can think of is that if the operator template is chosen, then some conversion of its argument is required, therefore it is no better than the operator int and operator bool. However, according to C++ rule, in the case of conversion operator, template argument deduction use the return type and the input argument is the *this, which is not converted.

Best,

Yan Zhou
On Feb 20, 2013, at 2:11 AM, Dirk Eddelbuettel <edd at debian.org> wrote:

            

Thread (22 messages)

Ken Williams Efficient DataFrame access by row & column Feb 19 Dirk Eddelbuettel Efficient DataFrame access by row & column Feb 19 Yan Zhou Efficient DataFrame access by row & column Feb 19 Ken Williams Efficient DataFrame access by row & column Feb 19 John Merrill Efficient DataFrame access by row & column Feb 19 Ken Williams Efficient DataFrame access by row & column Feb 19 Ken Williams Efficient DataFrame access by row & column Feb 19 Dirk Eddelbuettel Efficient DataFrame access by row & column Feb 19 Ken Williams Efficient DataFrame access by row & column Feb 19 John Merrill Efficient DataFrame access by row & column Feb 19 Kevin Ushey Efficient DataFrame access by row & column Feb 19 Ken Williams Efficient DataFrame access by row & column Feb 19 Ken Williams Efficient DataFrame access by row & column Feb 19 Ken Williams Efficient DataFrame access by row & column Feb 19 Dirk Eddelbuettel Efficient DataFrame access by row & column Feb 19 Yan Zhou Efficient DataFrame access by row & column Feb 19 Dirk Eddelbuettel Efficient DataFrame access by row & column Feb 19 Yan Zhou Efficient DataFrame access by row & column Feb 19 Dirk Eddelbuettel Efficient DataFrame access by row & column Feb 19 Romain Francois Efficient DataFrame access by row & column Feb 20 Ken Williams Efficient DataFrame access by row & column Feb 20 Yan Zhou Conversion operator for Rcpp::internal::generic_proxy (Previously Efficient DataFrame access by row & column) Feb 20