|
21 | 21 | #ifndef RcppArmadillo__version__arma__h |
22 | 22 | #define RcppArmadillo__version__arma__h |
23 | 23 |
|
24 | | - |
25 | | -// Purpose: By explicitly defining or undefining a variable the 'defined(...) that |
26 | | -// is in RcppArmadilloForward.h works as expected allowing us to selectively include |
27 | | -// either a 'legacy' Armadillo (i.e. 14.6.3. the last version to a) allow C++11 and |
28 | | -// b) permit suppression of deprecation warnings) or a 'current' Armadillo (i.e. as |
29 | | -// of this writing 15.0.1, or any later version) |
| 24 | +// This file was used to provide a selection mechanism with proper fallbacks after the |
| 25 | +// release of Armadill 15.0.0 and its switch to C++14 as the minimum standard. Now that |
| 26 | +// all CRAN packages can compile under this standard -- following a managed transition |
| 27 | +// period permitting adjustments as needed -- this is no longer required and the file is |
| 28 | +// effectively empty. |
30 | 29 | // |
31 | | -// See https://github.com/RcppCore/RcppArmadillo/issues/475 for more details |
32 | | - |
33 | | -// Sanity check: Cannot select both current and legacy but only one |
34 | | -#if defined(ARMA_USE_CURRENT) && defined(ARMA_USE_LEGACY) |
35 | | - #error "Do not select both 'current' and 'legacy', only one choice is possible." |
36 | | -#endif |
37 | | - |
38 | | -// Sanity check: Cannot select current under C++11 |
39 | | -#if defined(ARMA_USE_CURRENT) && __cplusplus <= 201103L |
40 | | - #error "Do not select 'current' with C++11 (or older) as 'current' requires C++14 or newer." |
41 | | -#endif |
42 | | - |
43 | | -// Carefully check and set if the user has -DARMA_USE_CURRENT |
44 | | -// This can be set in src/Makevars(.win) via PKG_CPPFLAGS (or equivalent) |
45 | | -#if defined(ARMA_USE_CURRENT) |
46 | | -#define ARMA_SELECTED_CURRENT_VERSION |
47 | | -#else |
48 | | -#undef ARMA_SELECTED_CURRENT_VERSION |
49 | | -#endif |
50 | | - |
51 | | -// Carefully check and set if the user has -DARMA_USE_LEGACY |
52 | | -// This can be set in src/Makevars(.win) via PKG_CPPFLAGS (or equivalent) |
53 | | -#if defined(ARMA_USE_LEGACY) |
54 | | -#define ARMA_SELECTED_LEGACY_VERSION |
55 | | -#else |
56 | | -#undef ARMA_SELECTED_LEGACY_VERSION |
57 | | -#endif |
58 | | - |
59 | | -// Fallback: Use 'legacy' and warn. |
60 | | -// This toggle can be turned to default to 'current' (allowing a legacy override) which we plan |
61 | | -// to do after a (sufficiently long) adjustment period |
62 | | -#if !defined(ARMA_SELECTED_LEGACY_VERSION) && !defined(ARMA_SELECTED_CURRENT_VERSION) |
63 | | - // Show messages, adjusted for compilation standard (as we also want to move on from C++11) |
64 | | - // We plan to 'at some point' flip to for C++14 |
65 | | - #if __cplusplus < 201402L |
66 | | - #pragma message("Using fallback compilation with Armadillo 14.6.3. Please consider defining -DARMA_USE_CURRENT and also removing C++11 compilation directive. See GitHub issue #475 for more.") |
67 | | - // Define selector used in RcppArmadilloForward.h |
68 | | - #define ARMA_SELECTED_LEGACY_VERSION |
69 | | - #undef ARMA_SELECTED_CURRENT_VERSION |
70 | | - #endif |
71 | | - // -- no longer automatically fall back to legacy version (unless in C++11 mode) |
72 | | - // #else |
73 | | - // #pragma message("Using fallback compilation with Armadillo 14.6.3. Please consider defining -DARMA_USE_CURRENT. See GitHub issue #475 for more.") |
74 | | - // // Define selector used in RcppArmadilloForward.h |
75 | | - // // It is our intention to select current here after transition instead of legacy |
76 | | - // #define ARMA_SELECTED_LEGACY_VERSION |
77 | | - // #undef ARMA_SELECTED_CURRENT_VERSION |
78 | | - // #endif |
79 | | -#endif |
80 | | - |
| 30 | +// See https://github.com/RcppCore/RcppArmadillo/issues/475 for more details. |
81 | 31 |
|
82 | 32 | #endif |
0 commit comments