MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / has_default_constructor

Method has_default_constructor

inst/include/Rcpp/module/class.h:158–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156 }
157
158 bool has_default_constructor(){
159 size_t n = constructors.size() ;
160 signed_constructor_class* p ;
161 for( size_t i=0; i<n; i++ ){
162 p = constructors[i];
163 if( p->nargs() == 0 ) return true ;
164 }
165 n = factories.size() ;
166 signed_factory_class* pfact ;
167 for( size_t i=0; i<n; i++ ){
168 pfact = factories[i];
169 if( pfact->nargs() == 0 ) return true ;
170 }
171 return false ;
172 }
173
174 SEXP invoke( SEXP method_xp, SEXP object, SEXP *args, int nargs ){
175 BEGIN_RCPP

Callers 1

RCPP_FUN_1Function · 0.45

Calls 2

sizeMethod · 0.45
nargsMethod · 0.45

Tested by

no test coverage detected