Skip to content

Commit 65fe67a

Browse files
committed
Remove 'legacy' 4.6.3 version, use current Armadillo unconditionally
1 parent f5d60b3 commit 65fe67a

File tree

1,292 files changed

+893
-208652
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,292 files changed

+893
-208652
lines changed

DESCRIPTION

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: RcppArmadillo
22
Type: Package
33
Title: 'Rcpp' Integration for the 'Armadillo' Templated Linear Algebra Library
4-
Version: 15.2.4-1
5-
Date: 2026-03-17
4+
Version: 15.2.4-1.1
5+
Date: 2026-03-20
66
Authors@R: c(person("Dirk", "Eddelbuettel", role = c("aut", "cre"), email = "edd@debian.org",
77
comment = c(ORCID = "0000-0001-6419-907X")),
88
person("Romain", "Francois", role = "aut",
@@ -28,11 +28,7 @@ Description: 'Armadillo' is a templated C++ linear algebra library aiming toward
2828
.
2929
The 'RcppArmadillo' package includes the header files from the 'Armadillo' library;
3030
users do not need to install 'Armadillo' itself in order to use 'RcppArmadillo'.
31-
Starting from release 15.0.0, the minimum compilation standard is C++14 so 'Armadillo'
32-
version 14.6.3 is included as a fallback when an R package forces the C++11 standard.
33-
Package authors should set a '#define' to select the 'current' version, or select the
34-
'legacy' version (also chosen as default) if they must. See 'GitHub issue #475' for
35-
details.
31+
Starting from release 15.0.0, the minimum compilation standard is C++14.
3632
.
3733
Since release 7.800.0, 'Armadillo' is licensed under Apache License 2; previous
3834
releases were under licensed as MPL 2.0 from version 3.800.0 onwards and LGPL-3

inst/include/RcppArmadillo.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
// RcppArmadillo.h: Rcpp/Armadillo glue
33
//
4-
// Copyright (C) 2010 - 2021 Dirk Eddelbuettel, Romain Francois and Douglas Bates
4+
// Copyright (C) 2010-2026 Dirk Eddelbuettel, Romain Francois and Douglas Bates
55
//
66
// This file is part of RcppArmadillo.
77
//
@@ -25,9 +25,6 @@
2525
#error "The file 'Rcpp.h' should not be included. Please correct to include only 'RcppArmadillo.h'."
2626
#endif
2727

28-
// Deal with Armadillo 14.6.3 (fallback) versus 15.0.* (or later, preference) selection
29-
#include <RcppArmadillo/version/arma.h>
30-
3128
// Set up actual #include <armadillo> after first #include <RcppArmadilloConfig> and more config
3229
#include <RcppArmadillo/interface/RcppArmadilloForward.h>
3330

inst/include/RcppArmadillo/interface/RcppArmadilloForward.h

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// RcppArmadilloForward.h: Rcpp/Armadillo glue
33
//
44
// Copyright (C) 2010 - 2014 Dirk Eddelbuettel, Romain Francois and Douglas Bates
5-
// Copyright (C) 2015 - 2025 Dirk Eddelbuettel
6-
// Copyright (C) 2019 - 2025 Conrad Sanderson
5+
// Copyright (C) 2015 - 2026 Dirk Eddelbuettel
6+
// Copyright (C) 2019 - 2026 Conrad Sanderson
77
//
88
// This file is part of RcppArmadillo.
99
//
@@ -47,39 +47,8 @@
4747
// installation of Armadillo
4848
#define ARMA_DONT_USE_WRAPPER
4949

50-
// See version/arma.h header for the (user and/or compilation) drive selection of these defines
51-
#if defined(ARMA_SELECTED_CURRENT_VERSION) || (__cplusplus >= 201402L)
52-
53-
// we include Armadillo 15.0.1 here -- but do it quietly
54-
//#pragma message("Using compilation with current Armadillo version.")
55-
56-
// Armadillo 15.0.1 or later
57-
#include "current/armadillo"
58-
59-
#else
60-
61-
// we use a catch-all else branch to provide for packages including this file directly
62-
// needless to say, we recommend one of the official entry-point headers
63-
#if !defined(ARMA_SELECTED_LEGACY_VERSION)
64-
#pragma message("Neither 'current' nor 'legacy' version selected. Ensure you use proper entry point headers.")
65-
#endif
66-
67-
// we include Armadillo 14.6.3 here -- but do it quietly
68-
//#pragma message("Using fallback compilation with Armadillo 14.6.3.")
69-
70-
// Armadillo has deprecation warnings (which RcppArmadillo suppressed at time to
71-
// minimise issies at CRAN). Should your package display any, and you decide
72-
// _not_ to fix the root causes (see RcppArmadillo GitHub Issues #391 and #402
73-
// for details) then defining the following macro will help. You can add a
74-
// #define in your source code before including the RcppArmadillo header, or add
75-
// a -DARMA_IGNORE_DEPRECATED_MARKER to the PKG_CPPFLAGS in src/Makevars.
76-
//
77-
// Renabling globally again for Armadillo 14.6.* as too many packages trigger this
78-
#define ARMA_IGNORE_DEPRECATED_MARKER
79-
80-
#include "legacy/armadillo"
81-
82-
#endif
50+
// Armadillo 15.0.1 or later
51+
#include "armadillo"
8352

8453
/* forward declarations */
8554
namespace Rcpp {

inst/include/RcppArmadillo/version/arma.h

Lines changed: 6 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -21,62 +21,12 @@
2121
#ifndef RcppArmadillo__version__arma__h
2222
#define RcppArmadillo__version__arma__h
2323

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.
3029
//
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.
8131

8232
#endif

0 commit comments

Comments
 (0)