Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork219
Header cleanup with C++11 as a baseline#1364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
1d9a549f1956602665b4d39f3c42d2c859ad4870af714c4838809c39e1150dc12c29eefa5d1f1File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,6 @@ | ||
| // compiler.h: Rcpp R/C++ interface class library -- check compiler | ||
| // | ||
| // Copyright (C) 2012 -2025 Dirk Eddelbuettel, Romain Francois, and Kevin Ushey | ||
| // | ||
| // This file is part of Rcpp. | ||
| // | ||
| @@ -24,173 +22,30 @@ | ||
| // NB: A vast list valid identifiers is at these wiki pages: | ||
| // http://sourceforge.net/p/predef/wiki/Home/ | ||
| #if !defined(__GNUC__) && !defined(__SUNPRO_CC) && !defined(__clang__) && !defined(__INTEL_COMPILER) | ||
| #error "This compiler is not supported" | ||
eddelbuettel marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| #endif | ||
| // Simpler test and minimal standard: C++11 or else we die | ||
| #if __cplusplus < 201103L | ||
| #error "The C++ compilation standard is too old: use C++11 or newer." | ||
| #endif | ||
| // C++11 features -- that used to be carefully tested for or worked around via CXX0X / TR1 | ||
| // These defines are all planned to get removed just how a number have already been removed. One at a time... | ||
| #define RCPP_USING_CXX11 | ||
| #define HAS_VARIADIC_TEMPLATES | ||
Enchufa2 marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| #include <cmath> | ||
| #include <initializer_list> | ||
| #include <unordered_map> | ||
| #define RCPP_USING_UNORDERED_MAP | ||
| #define RCPP_UNORDERED_MAP std::unordered_map | ||
| #include <unordered_set> | ||
| #define RCPP_USING_UNORDERED_SET | ||
| #define RCPP_UNORDERED_SET std::unordered_set | ||
Enchufa2 marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| #if defined(__GNUC__) | ||
| #define RCPP_HAS_DEMANGLING | ||
| #endif | ||
| #endif | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -21,17 +21,16 @@ | ||
| #ifndef Rcpp__sugar__sapply_h | ||
| #define Rcpp__sugar__sapply_h | ||
| // This used to be conditional on a define and test in compiler.h | ||
| #include <type_traits> // ::std::result_of | ||
| namespace Rcpp{ | ||
| namespace sugar{ | ||
| template <typename Function, typename SugarExpression> | ||
| struct sapply_application_result_of | ||
| { | ||
| #if__cplusplus >= 201103L | ||
| #if __cplusplus < 201703L | ||
| // deprecated by C++17, removed by C++2020, see https://en.cppreference.com/w/cpp/types/result_of | ||
| typedef typename ::std::result_of<Function(typename SugarExpression::stored_type)>::type type; | ||
| @@ -40,9 +39,10 @@ struct sapply_application_result_of | ||
| typedef typename ::std::invoke_result<Function, typename SugarExpression::stored_type>::type type; | ||
| #endif | ||
| #else | ||
| // TODO this else branch can likely go | ||
Enchufa2 marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| typedef typename ::Rcpp::traits::result_of<Function>::type type; | ||
| #endif | ||
| }; | ||
| // template <typename Function, typename SugarExpression> | ||
| // using sapply_application_result_of_t = typename sapply_application_result_of<Function, SugarExpression>::type; | ||
Uh oh!
There was an error while loading.Please reload this page.