11
22// Module.h: Rcpp R/C++ interface class library -- Rcpp modules
33//
4- // Copyright (C) 2010 - 2012 Dirk Eddelbuettel and Romain Francois
4+ // Copyright (C) 2010 - 2025 Dirk Eddelbuettel and Romain Francois
55//
66// This file is part of Rcpp.
77//
@@ -86,7 +86,6 @@ namespace Rcpp{
8686#include < Rcpp/module/CppFunction.h>
8787#include < Rcpp/module/get_return_type.h>
8888
89- #if defined(HAS_VARIADIC_TEMPLATES)
9089namespace Rcpp {
9190 template <typename RESULT_TYPE, typename ... T>
9291 inline void signature (std::string& s, const char * name) {
@@ -132,11 +131,7 @@ namespace Rcpp {
132131 Rcpp::List formals;
133132 };
134133}
135- #else
136- #include < Rcpp/module/Module_generated_get_signature.h>
137- // templates CppFunction0, ..., CppFunction65
138- #include < Rcpp/module/Module_generated_CppFunction.h>
139- #endif
134+
140135#include < Rcpp/module/class_Base.h>
141136#include < Rcpp/module/Module.h>
142137
@@ -177,7 +172,7 @@ namespace Rcpp{
177172 private:
178173 ParentMethod* parent_method_pointer ;
179174 } ;
180- # if defined(HAS_VARIADIC_TEMPLATES)
175+
181176 template <typename ... T>
182177 inline void ctor_signature (std::string& s, const std::string& classname) {
183178 s.assign (classname);
@@ -251,13 +246,6 @@ namespace Rcpp{
251246 return nargs == n ;
252247 }
253248
254- #else
255- #include < Rcpp/module/Module_generated_ctor_signature.h>
256- #include < Rcpp/module/Module_generated_Constructor.h>
257- #include < Rcpp/module/Module_generated_Factory.h>
258- #include < Rcpp/module/Module_generated_class_signature.h>
259- #endif
260-
261249 typedef bool (*ValidConstructor)(SEXP*,int ) ;
262250 typedef bool (*ValidMethod)(SEXP*,int ) ;
263251
@@ -381,7 +369,7 @@ namespace Rcpp{
381369
382370 } ;
383371
384- # if defined(HAS_VARIADIC_TEMPLATES)
372+
385373 template <bool IsConst,typename Class, typename RESULT_TYPE, typename ... T>
386374 class CppMethodImplN : public CppMethod <Class> {
387375 public:
@@ -441,10 +429,8 @@ namespace Rcpp{
441429
442430 template <typename Class, typename RESULT_TYPE, typename ... T>
443431 using Const_Pointer_CppMethodN = Pointer_CppMethodImplN<true , Class, RESULT_TYPE, T...>;
444- #else
445- #include < Rcpp/module/Module_generated_CppMethod.h>
446- #include < Rcpp/module/Module_generated_Pointer_CppMethod.h>
447- #endif
432+
433+
448434
449435 template <typename Class>
450436 class CppProperty {
@@ -552,7 +538,7 @@ namespace Rcpp{
552538 } ;
553539}
554540
555- # if defined(HAS_VARIADIC_TEMPLATES)
541+
556542namespace Rcpp {
557543 template <typename RESULT_TYPE, typename ... T>
558544 void function (const char * name_, RESULT_TYPE (*fun)(T... t), const char* docstring = 0) {
@@ -570,10 +556,7 @@ namespace Rcpp {
570556 }
571557 }
572558}
573- #else
574- // function factories
575- #include < Rcpp/module/Module_generated_function.h>
576- #endif
559+
577560
578561namespace Rcpp {
579562
0 commit comments