> 
> namespace Rcpp {
>       template <> B as( SEXP ){
>               Rcpp::Reference in_b(b);
>               id=in_b.field("id");
>       }
> }
> 

This should be:

namespace Rcpp {
        template <> B as( SEXP );
}

#include <Rcpp.h>

template <> B Rcpp::as( SEXP b ){
    Rcpp::Reference in_b(b);
    return B(wrap<int>(in_b.field("id")));
}

Which I have tried, but I still get the same error. Will follow up on Dirk's 
other suggestions.

_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to