Skip to content

usethis::use_rcpp_armadillo() Generates CXX_STD=CXX1, Leading to CRAN Note on C++11 Specification #1889

Description

@TimothyMerlin

Issue: usethis::use_rcpp_armadillo() Generates CXX_STD=CXX1, Leading to CRAN Note on C++11 Specification

Description:

When using the usethis::use_rcpp_armadillo() function, it generates src/Makevars and src/Makevars.win with CXX_STD=CXX1 . Running devtools::check() subsequently raises a note:

checking C++ specification ... NOTE 

Specified C++11: please drop specification unless essential

This issue creates a non-compliance with CRAN standards, requiring that the line, containing CXX_STD=CXX1, is manually removed in both files.

Steps to Reproduce:

  1. Call the usethis::use_rcpp_armadillo(name = "cppcode") function.
  2. Run devtools::check().
  3. Observe the note regarding the C++11 specification.

Expected Behavior:

The function should generate src/Makevars and src/Makevars.win without CXX_STD=CXX1 or handle this in a way that aligns with CRAN's requirements.

Actual Behavior:

The line CXX_STD=CXX1 is generated, leading to a note during the check process, and manual removal is required to conform to CRAN.

Suggested Fix:

Either omit this line or handle it in a way that is compatible with CRAN standards.

System Information:

  • usethis version: 2.2.2
  • devtools version 2.4.5
  • R version: 4.3.1
  • Operating System: Ubuntu 22.04.2 LTS

Activity

  1. added
    bug
    good first issue ❤️
    code 🖥️
    on Nov 3, 2023
  2. jennybc commented on Nov 3, 2023

    @jennybc
    Member

    For reference, here's where the equivalent already happened for use_cpp11(): 4a83ded

  3. added
    tidy-dev-day 🤓
    on Jul 22, 2024
  4. added this to the Backlog milestone on Jul 25, 2025
  5. added a commit that references this issue on Sep 17, 2026
    cf0416e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcode 🖥️good first issue ❤️tidy-dev-day 🤓

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions