Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
2025-03-18 Dirk Eddelbuettel <[email protected]>

* DESCRIPTION (Version, Date): Roll micro version and date
* inst/include/Rcpp/config.h: Idem

* inst/include/Rcpp/module/class.h: Use variadic templates unconditionally
* inst/include/Rcpp/grow.h: Idem
* inst/include/Rcpp/DottedPair.h: Idem
* inst/include/Rcpp/Vector.h: Idem
* inst/include/Rcpp/Function.h: Idem
* inst/include/Rcpp/internal/call.h: Idem
* inst/include/Rcpp/InternalFunctionWithStdFunction.h: Idem
* inst/include/Rcpp/Module.h: Idem
* inst/include/Rcpp/traits/index_sequence.h: Idem
* inst/include/Rcpp/traits/named_object.h: Idem
* inst/include/Rcpp/Language.h: Idem
* inst/include/Rcpp/DataFrame.h: Idem
* inst/include/Rcpp/PairList.h: Idem
* inst/include/Rcpp/InternalFunction.h: Idem

* inst/include/Rcpp/module/Module_generated_class_constructor.h: Removed
* inst/include/Rcpp/module/Module_generated_class_factory.h: Idem
* inst/include/Rcpp/module/Module_generated_method.h: Idem
* inst/include/Rcpp/module/Module_generated_Pointer_method.h: Idem
* inst/include/Rcpp/generated/grow__pairlist.h: Idem
* inst/include/Rcpp/generated/DottedPair__ctors.h: Idem
* inst/include/Rcpp/generated/Vector__create.h: Idem
* inst/include/Rcpp/generated/Function__operator.h: Idem
* inst/include/Rcpp/generated/InternalFunctionWithStdFunction_call.h: Idem
* inst/include/Rcpp/module/Module_generated_Constructor.h: Idem
* inst/include/Rcpp/module/Module_generated_CppFunction.h: Idem
* inst/include/Rcpp/module/Module_generated_CppMethod.h: Idem
* inst/include/Rcpp/module/Module_generated_Factory.h: Idem
* inst/include/Rcpp/module/Module_generated_Pointer_CppMethod.h: Idem
* inst/include/Rcpp/module/Module_generated_class_signature.h: Idem
* inst/include/Rcpp/module/Module_generated_ctor_signature.h: Idem
* inst/include/Rcpp/module/Module_generated_function.h: Idem
* inst/include/Rcpp/module/Module_generated_get_signature.h: Idem
* inst/include/Rcpp/generated/Language__ctors.h: Idem
* inst/include/Rcpp/generated/DataFrame_generated.h: Idem
* inst/include/Rcpp/generated/Pairlist__ctors.h: Idem
* inst/include/Rcpp/generated/InternalFunction__ctors.h: Idem

* inst/include/Rcpp/platform/compiler.h: No longer define HAS_VARIADIC_TEMPLATES
* src/api.cpp (rcpp_can_use_cxx0x): Return true unconditionally

2025-03-15 Dirk Eddelbuettel <[email protected]>

* DESCRIPTION (Version, Date): Roll micro version and date
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: Rcpp
Title: Seamless R and C++ Integration
Version: 1.0.14.7
Date: 2025-03-15
Version: 1.0.14.8
Date: 2025-03-17
Authors@R: c(person("Dirk", "Eddelbuettel", role = c("aut", "cre"), email = "[email protected]",
comment = c(ORCID = "0000-0001-6419-907X")),
person("Romain", "Francois", role = "aut",
Expand Down
14 changes: 5 additions & 9 deletions inst/include/Rcpp/DataFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// DataFrame.h: Rcpp R/C++ interface class library -- data frames
//
// Copyright (C) 2010 - 2021 Dirk Eddelbuettel and Romain Francois
// Copyright (C) 2010 - 2025 Dirk Eddelbuettel and Romain Francois
//
// This file is part of Rcpp.
//
Expand Down Expand Up @@ -117,14 +117,10 @@ namespace Rcpp{
static DataFrame_Impl create(){
return DataFrame_Impl() ;
}
#if defined(HAS_VARIADIC_TEMPLATES)
template <typename... T>
static DataFrame_Impl create(const T&... args) {
return DataFrame_Impl::from_list(Parent::create(args...));
}
#else
#include <Rcpp/generated/DataFrame_generated.h>
#endif
template <typename... T>
static DataFrame_Impl create(const T&... args) {
return DataFrame_Impl::from_list(Parent::create(args...));
}

private:
void set__(SEXP x){
Expand Down
14 changes: 5 additions & 9 deletions inst/include/Rcpp/DottedPair.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// DottedPair.h: Rcpp R/C++ interface class library -- dotted pair list template
//
// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
// Copyright (C) 2010 - 2025 Dirk Eddelbuettel and Romain Francois
//
// This file is part of Rcpp.
//
Expand Down Expand Up @@ -35,14 +35,10 @@ RCPP_API_CLASS(DottedPair_Impl),
DottedPair_Impl(SEXP x) {
Storage::set__(x) ;
}
#if defined(HAS_VARIADIC_TEMPLATES)
template <typename... T>
DottedPair_Impl(const T&... args) {
Storage::set__(pairlist(args...));
}
#else
#include <Rcpp/generated/DottedPair__ctors.h>
#endif
template <typename... T>
DottedPair_Impl(const T&... args) {
Storage::set__(pairlist(args...));
}

void update(SEXP){}

Expand Down
10 changes: 3 additions & 7 deletions inst/include/Rcpp/Function.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,10 @@ namespace Rcpp{
return Rcpp_fast_eval(call, R_GlobalEnv);
}

#if defined(HAS_VARIADIC_TEMPLATES)
template <typename... T>
SEXP operator()(const T&... args) const {
template <typename... T>
SEXP operator()(const T&... args) const {
return invoke(pairlist(args...), R_GlobalEnv);
}
#else
#include <Rcpp/generated/Function__operator.h>
#endif
}

/**
* Returns the environment of this function
Expand Down
6 changes: 0 additions & 6 deletions inst/include/Rcpp/InternalFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@

#include <Rcpp/grow.h>

#ifdef RCPP_USING_CXX11
#include <Rcpp/InternalFunctionWithStdFunction.h>
#endif

namespace Rcpp{

Expand All @@ -37,7 +35,6 @@ namespace Rcpp{

RCPP_GENERATE_CTOR_ASSIGN(InternalFunction_Impl)

#ifdef RCPP_USING_CXX11
template <typename RESULT_TYPE, typename... Args>
InternalFunction_Impl(const std::function<RESULT_TYPE(Args...)> &fun) {
set(
Expand All @@ -51,9 +48,6 @@ namespace Rcpp{
InternalFunction_Impl(RESULT_TYPE (*fun)(T...)) {
set(XPtr<CppFunctionN<RESULT_TYPE, T...> >(new CppFunctionN<RESULT_TYPE, T...>(fun), true));
}
#else
#include <Rcpp/generated/InternalFunction__ctors.h>
#endif

void update(SEXP){}
private:
Expand Down
10 changes: 2 additions & 8 deletions inst/include/Rcpp/InternalFunctionWithStdFunction.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
//
// InternalFunction_with_std_function.h: Rcpp R/C++ interface class library -- exposing C++ std::function's
//
// Copyright (C) 2014 Christian Authmann
// Copyright (C) 2015 Romain Francois and Dirk Eddelbuettel
// Copyright (C) 2014 - 2025 Christian Authmann
// Copyright (C) 2015 - 2025 Romain Francois and Dirk Eddelbuettel
//
// This file is part of Rcpp.
//
Expand All @@ -23,17 +22,12 @@
#ifndef Rcpp_InternalFunctionWithStdFunction_h
#define Rcpp_InternalFunctionWithStdFunction_h

#if defined(HAS_VARIADIC_TEMPLATES)
#include <Rcpp/internal/call.h>
#endif
#include <functional>

namespace Rcpp {

namespace InternalFunctionWithStdFunction {
#if !defined(HAS_VARIADIC_TEMPLATES) && !defined(RCPP_USING_CXX11)
#include <Rcpp/generated/InternalFunctionWithStdFunction_call.h>
#endif

template <typename RESULT_TYPE, typename... Args>
class CppFunctionBaseFromStdFunction : public CppFunctionBase {
Expand Down
22 changes: 9 additions & 13 deletions inst/include/Rcpp/Language.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

// Language.h: Rcpp R/C++ interface class library -- language objects (calls)
//
// Copyright (C) 2010 - 2022 Dirk Eddelbuettel and Romain Francois
// Copyright (C) 2010 - 2025 Dirk Eddelbuettel and Romain Francois
//
// This file is part of Rcpp.
//
Expand Down Expand Up @@ -102,19 +102,15 @@ namespace Rcpp{
* 0.0 is wrapped as a numeric vector using wrap( const& double )
* ...
*/
#if defined(HAS_VARIADIC_TEMPLATES)
template <typename... T>
Language_Impl(const std::string& symbol, const T&... t) {
Storage::set__(pairlist(Rf_install(symbol.c_str()), t...) );
}
template <typename... T>
Language_Impl(const std::string& symbol, const T&... t) {
Storage::set__(pairlist(Rf_install(symbol.c_str()), t...) );
}

template <typename... T>
Language_Impl(const Function& function, const T&... t) {
Storage::set__(pairlist(function, t...));
}
#else
#include <Rcpp/generated/Language__ctors.h>
#endif
template <typename... T>
Language_Impl(const Function& function, const T&... t) {
Storage::set__(pairlist(function, t...));
}

/**
* sets the symbol of the call
Expand Down
33 changes: 8 additions & 25 deletions inst/include/Rcpp/Module.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

// Module.h: Rcpp R/C++ interface class library -- Rcpp modules
//
// Copyright (C) 2010 - 2012 Dirk Eddelbuettel and Romain Francois
// Copyright (C) 2010 - 2025 Dirk Eddelbuettel and Romain Francois
//
// This file is part of Rcpp.
//
Expand Down Expand Up @@ -86,7 +86,6 @@ namespace Rcpp{
#include <Rcpp/module/CppFunction.h>
#include <Rcpp/module/get_return_type.h>

#if defined(HAS_VARIADIC_TEMPLATES)
namespace Rcpp {
template <typename RESULT_TYPE, typename... T>
inline void signature(std::string& s, const char* name) {
Expand Down Expand Up @@ -132,11 +131,7 @@ namespace Rcpp {
Rcpp::List formals;
};
}
#else
#include <Rcpp/module/Module_generated_get_signature.h>
// templates CppFunction0, ..., CppFunction65
#include <Rcpp/module/Module_generated_CppFunction.h>
#endif

#include <Rcpp/module/class_Base.h>
#include <Rcpp/module/Module.h>

Expand Down Expand Up @@ -177,7 +172,7 @@ namespace Rcpp{
private:
ParentMethod* parent_method_pointer ;
} ;
#if defined(HAS_VARIADIC_TEMPLATES)

template <typename... T>
inline void ctor_signature(std::string& s, const std::string& classname) {
s.assign(classname);
Expand Down Expand Up @@ -251,13 +246,6 @@ namespace Rcpp{
return nargs == n ;
}

#else
#include <Rcpp/module/Module_generated_ctor_signature.h>
#include <Rcpp/module/Module_generated_Constructor.h>
#include <Rcpp/module/Module_generated_Factory.h>
#include <Rcpp/module/Module_generated_class_signature.h>
#endif

typedef bool (*ValidConstructor)(SEXP*,int) ;
typedef bool (*ValidMethod)(SEXP*,int) ;

Expand Down Expand Up @@ -381,7 +369,7 @@ namespace Rcpp{

} ;

#if defined(HAS_VARIADIC_TEMPLATES)

template <bool IsConst,typename Class, typename RESULT_TYPE, typename... T>
class CppMethodImplN : public CppMethod<Class> {
public:
Expand Down Expand Up @@ -441,10 +429,8 @@ namespace Rcpp{

template <typename Class, typename RESULT_TYPE, typename... T>
using Const_Pointer_CppMethodN = Pointer_CppMethodImplN<true, Class, RESULT_TYPE, T...>;
#else
#include <Rcpp/module/Module_generated_CppMethod.h>
#include <Rcpp/module/Module_generated_Pointer_CppMethod.h>
#endif



template <typename Class>
class CppProperty {
Expand Down Expand Up @@ -552,7 +538,7 @@ namespace Rcpp{
} ;
}

#if defined(HAS_VARIADIC_TEMPLATES)

namespace Rcpp {
template <typename RESULT_TYPE, typename... T>
void function(const char* name_, RESULT_TYPE (*fun)(T... t), const char* docstring = 0) {
Expand All @@ -570,10 +556,7 @@ namespace Rcpp {
}
}
}
#else
// function factories
#include <Rcpp/module/Module_generated_function.h>
#endif


namespace Rcpp {

Expand Down
15 changes: 6 additions & 9 deletions inst/include/Rcpp/Pairlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// Pairlist.h: Rcpp R/C++ interface class library -- pair lists objects (LISTSXP)
//
// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
// Copyright (C) 2010 - 2025 Dirk Eddelbuettel and Romain Francois
//
// This file is part of Rcpp.
//
Expand Down Expand Up @@ -42,14 +42,11 @@ namespace Rcpp{
Pairlist_Impl(SEXP x){
Storage::set__(r_cast<LISTSXP>(x)) ;
}
#if defined(HAS_VARIADIC_TEMPLATES)
template <typename... T>
Pairlist_Impl(const T&... args ){
Storage::set__(pairlist(args... )) ;
}
#else
#include <Rcpp/generated/Pairlist__ctors.h>
#endif
template <typename... T>
Pairlist_Impl(const T&... args ){
Storage::set__(pairlist(args... )) ;
}

void update(SEXP x) {
if (TYPEOF(x) != LISTSXP) {
Storage::set__(r_cast<LISTSXP>(x));
Expand Down
4 changes: 2 additions & 2 deletions inst/include/Rcpp/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define RCPP_VERSION_STRING "1.0.14"

// the current source snapshot (using four components, if a fifth is used in DESCRIPTION we ignore it)
#define RCPP_DEV_VERSION RcppDevVersion(1,0,14,7)
#define RCPP_DEV_VERSION_STRING "1.0.14.7"
#define RCPP_DEV_VERSION RcppDevVersion(1,0,14,8)
#define RCPP_DEV_VERSION_STRING "1.0.14.8"

#endif
Loading