Skip to content

Commit ab6be63

Browse files
committed
Do not rely on __has_feature() for g++
Given that we test for C++11 we can assume variadic templates and just use the #define. Can likely be generalized to icc and clang too.
1 parent fea85aa commit ab6be63

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

inst/include/Rcpp/platform/compiler.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,10 @@
7070
#define HAS_STATIC_ASSERT
7171
#endif
7272
#elif defined(__GNUC__)
73+
// given the check about __cplusplus we can unconditionally define
7374
#define RCPP_USING_CXX11
74-
#if __has_feature(cxx_variadic_templates)
75-
#define HAS_VARIADIC_TEMPLATES
76-
#endif
77-
#if __has_feature(cxx_static_assert)
78-
#define HAS_STATIC_ASSERT
79-
#endif
75+
#define HAS_VARIADIC_TEMPLATES
76+
#define HAS_STATIC_ASSERT
8077
#endif
8178

8279
// Check C++0x headers (TODO remove when no longer needed below)

0 commit comments

Comments
 (0)