Skip to content

Commit e7da623

Browse files
committed
uncomment HAS_VARIADIC_TEMPLATES capability, simplify ifdefs
1 parent 38983cb commit e7da623

File tree

15 files changed

+23
-23
lines changed

15 files changed

+23
-23
lines changed

inst/include/Rcpp/DataFrame.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ namespace Rcpp{
117117
static DataFrame_Impl create(){
118118
return DataFrame_Impl() ;
119119
}
120-
#if defined(HAS_VARIADIC_TEMPLATES) || defined(RCPP_USING_CXX11)
120+
#if defined(HAS_VARIADIC_TEMPLATES)
121121
template <typename... T>
122122
static DataFrame_Impl create(const T&... args) {
123123
return DataFrame_Impl::from_list(Parent::create(args...));

inst/include/Rcpp/DottedPair.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ RCPP_API_CLASS(DottedPair_Impl),
3535
DottedPair_Impl(SEXP x) {
3636
Storage::set__(x) ;
3737
}
38-
#if defined(HAS_VARIADIC_TEMPLATES) || defined(RCPP_USING_CXX11)
38+
#if defined(HAS_VARIADIC_TEMPLATES)
3939
template <typename... T>
4040
DottedPair_Impl(const T&... args) {
4141
Storage::set__(pairlist(args...));

inst/include/Rcpp/Function.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ namespace Rcpp{
8282
return Rcpp_fast_eval(call, R_GlobalEnv);
8383
}
8484

85-
#if defined(HAS_VARIADIC_TEMPLATES) || defined(RCPP_USING_CXX11)
85+
#if defined(HAS_VARIADIC_TEMPLATES)
8686
template <typename... T>
8787
SEXP operator()(const T&... args) const {
8888
return invoke(pairlist(args...), R_GlobalEnv);

inst/include/Rcpp/InternalFunctionWithStdFunction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#ifndef Rcpp_InternalFunctionWithStdFunction_h
2424
#define Rcpp_InternalFunctionWithStdFunction_h
2525

26-
#if defined(HAS_VARIADIC_TEMPLATES) || defined(RCPP_USING_CXX11)
26+
#if defined(HAS_VARIADIC_TEMPLATES)
2727
#include <Rcpp/internal/call.h>
2828
#endif
2929
#include <functional>

inst/include/Rcpp/Language.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ namespace Rcpp{
102102
* 0.0 is wrapped as a numeric vector using wrap( const& double )
103103
* ...
104104
*/
105-
#if defined(HAS_VARIADIC_TEMPLATES) || defined(RCPP_USING_CXX11)
105+
#if defined(HAS_VARIADIC_TEMPLATES)
106106
template <typename... T>
107107
Language_Impl(const std::string& symbol, const T&... t) {
108108
Storage::set__(pairlist(Rf_install(symbol.c_str()), t...) );

inst/include/Rcpp/Module.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ namespace Rcpp{
8686
#include <Rcpp/module/CppFunction.h>
8787
#include <Rcpp/module/get_return_type.h>
8888

89-
#if defined(HAS_VARIADIC_TEMPLATES) || defined(RCPP_USING_CXX11)
89+
#if defined(HAS_VARIADIC_TEMPLATES)
9090
namespace Rcpp {
9191
template <typename RESULT_TYPE, typename... T>
9292
inline void signature(std::string& s, const char* name) {
@@ -176,7 +176,7 @@ namespace Rcpp{
176176
private:
177177
ParentMethod* parent_method_pointer ;
178178
} ;
179-
#if defined(HAS_VARIADIC_TEMPLATES) || defined(RCPP_USING_CXX11)
179+
#if defined(HAS_VARIADIC_TEMPLATES)
180180
template <typename... T>
181181
inline void ctor_signature(std::string& s, const std::string& classname) {
182182
s.assign(classname);
@@ -380,7 +380,7 @@ namespace Rcpp{
380380

381381
} ;
382382

383-
#if defined(HAS_VARIADIC_TEMPLATES) || defined(RCPP_USING_CXX11)
383+
#if defined(HAS_VARIADIC_TEMPLATES)
384384
template <bool IsConst,typename Class, typename RESULT_TYPE, typename... T>
385385
class CppMethodImplN : public CppMethod<Class> {
386386
public:
@@ -551,7 +551,7 @@ namespace Rcpp{
551551
} ;
552552
}
553553

554-
#if defined(HAS_VARIADIC_TEMPLATES) || defined(RCPP_USING_CXX11)
554+
#if defined(HAS_VARIADIC_TEMPLATES)
555555
namespace Rcpp {
556556
template <typename RESULT_TYPE, typename... T>
557557
void function(const char* name_, RESULT_TYPE (*fun)(T... t), const char* docstring = 0) {

inst/include/Rcpp/Pairlist.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace Rcpp{
4242
Pairlist_Impl(SEXP x){
4343
Storage::set__(r_cast<LISTSXP>(x)) ;
4444
}
45-
#if defined(HAS_VARIADIC_TEMPLATES) || defined(RCPP_USING_CXX11)
45+
#if defined(HAS_VARIADIC_TEMPLATES)
4646
template <typename... T>
4747
Pairlist_Impl(const T&... args ){
4848
Storage::set__(pairlist(args... )) ;

inst/include/Rcpp/grow.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ namespace Rcpp {
7070
return grow(Rf_mkString(head), y);
7171
}
7272

73-
#if defined(HAS_VARIADIC_TEMPLATES) || defined(RCPP_USING_CXX11)
73+
#if defined(HAS_VARIADIC_TEMPLATES)
7474
template <typename T1>
7575
SEXP pairlist(const T1& t1) {
7676
return grow( t1, R_NilValue ) ;

inst/include/Rcpp/internal/call.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <Rcpp/traits/index_sequence.h>
55
#include <functional>
66

7-
#if defined(HAS_VARIADIC_TEMPLATES) || defined(RCPP_USING_CXX11)
7+
#if defined(HAS_VARIADIC_TEMPLATES)
88

99
namespace Rcpp {
1010
namespace internal {
@@ -15,7 +15,7 @@ template <typename... T> struct type_pack {};
1515
/**
1616
* This specialisation is for functions that return a value, whereas the below
1717
* is for void-returning functions.
18-
*
18+
*
1919
* The "* = nullptr" default argument allows both templates to be well-defined
2020
* regardless of which one is used.
2121
*/
@@ -40,7 +40,7 @@ SEXP call_impl(const F& fun, SEXP* args, type_pack<RESULT_TYPE, Us...>,
4040
* Helper for calling a function with an array of SEXP arguments,
4141
* where each argument is converted to the appropriate type before being passed
4242
* to the function. A compile-time sequence is used to index the SEXP array.
43-
*
43+
*
4444
* The function only needs the intended types of the result and arguments,
4545
* which allows the template to be used for function pointers, lambdas, and
4646
* `std::function` objects.

inst/include/Rcpp/module/class.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
return constructor( docstring, valid ) ;
111111
}
112112

113-
#if defined(HAS_VARIADIC_TEMPLATES) || defined(RCPP_USING_CXX11)
113+
#if defined(HAS_VARIADIC_TEMPLATES)
114114
template <typename... T>
115115
self& constructor( const char* docstring = 0, ValidConstructor valid = &yes_arity<sizeof...(T)> ){
116116
AddConstructor( new Constructor<Class,T...> , valid, docstring ) ;
@@ -265,7 +265,7 @@
265265
return *this ;
266266
}
267267

268-
#if defined(HAS_VARIADIC_TEMPLATES) || defined(RCPP_USING_CXX11)
268+
#if defined(HAS_VARIADIC_TEMPLATES)
269269
template <typename RESULT_TYPE, typename... T>
270270
self& method(const char* name_, RESULT_TYPE (Class::*fun)(T...),
271271
const char* docstring = 0, ValidMethod valid = &yes_arity<sizeof...(T)>) {

0 commit comments

Comments
 (0)