chore(c++): Upgrade c++ compiler from c++11 to c++14#205
chore(c++): Upgrade c++ compiler from c++11 to c++14#205tonywu1999 wants to merge 2 commits intodevelfrom
Conversation
📝 WalkthroughWalkthroughThe build configuration updates the C++ compilation standard from C++11 to C++14 by modifying the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~1 minute Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/Makevars`:
- Line 1: Update the Windows Makevars to use the same C++ standard as the Unix
Makevars by changing the CXX_STD assignment in the Makevars.win file from CXX11
to CXX14 (i.e., set "CXX_STD = CXX14"); also update the package metadata by
adding a SystemRequirements entry "SystemRequirements: C++14" to DESCRIPTION to
document the C++14 requirement.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| @@ -1,3 +1,3 @@ | |||
| CXX_STD = CXX11 | |||
| CXX_STD = CXX14 | |||
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Read-only checks for C++14 alignment
set -euo pipefail
echo "== DESCRIPTION: C++ / system requirements =="
fd -i '^DESCRIPTION$' -x sh -c 'echo "-- {}"; rg -n "SystemRequirements|C\\+\\+|Depends" "{}" || true'
echo
echo "== CI workflows: R/toolchain matrix and std references =="
fd -i '.*\\.(yml|yaml)$' .github 2>/dev/null | xargs -r rg -n "r-version|matrix|CXX11|CXX14|CXX17|ubuntu|macos|windows" || true
echo
echo "== Build files: conflicting hardcoded std flags =="
rg -n --iglob '*Makevars*' --iglob 'Makefile*' --iglob '*.mk' --iglob '*.cmake' "std=c\\+\\+|CXX11|CXX14|CXX17"Repository: Vitek-Lab/MSstats
Length of output: 323
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== src/Makevars content ==="
cat -n src/Makevars
echo
echo "=== src/Makevars.win content (if exists) ==="
if [ -f src/Makevars.win ]; then
cat -n src/Makevars.win
else
echo "File does not exist"
fi
echo
echo "=== Search for all Makevars* files ==="
fd -i makevars
echo
echo "=== DESCRIPTION file (full content) ==="
cat -n DESCRIPTIONRepository: Vitek-Lab/MSstats
Length of output: 2772
Update src/Makevars.win to match C++14 standard.
The PR updated src/Makevars to CXX_STD = CXX14, but src/Makevars.win still declares CXX_STD = CXX11. This platform inconsistency will cause Windows builds to use a different compiler standard than Unix/Linux/macOS builds, risking compilation failures or divergent behavior across platforms.
Platform mismatch detail
src/Makevars: CXX_STD = CXX14
src/Makevars.win: CXX_STD = CXX11 ← Must be updated to CXX14
Also add SystemRequirements: C++14 to the DESCRIPTION file to document this requirement explicitly.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/Makevars` at line 1, Update the Windows Makevars to use the same C++
standard as the Unix Makevars by changing the CXX_STD assignment in the
Makevars.win file from CXX11 to CXX14 (i.e., set "CXX_STD = CXX14"); also update
the package metadata by adding a SystemRequirements entry "SystemRequirements:
C++14" to DESCRIPTION to document the C++14 requirement.
RcppCore/RcppArmadillo#475
PR Type
Other, Enhancement
Description
Upgrade package C++ standard to C++14
Update native build configuration in
MakevarsDiagram Walkthrough
File Walkthrough
Makevars
Raise native compilation standard to C++14src/Makevars
CXX_STDfromCXX11toCXX14Motivation and Context
This PR upgrades the C++ compiler standard requirement for the MSstats package from C++11 to C++14. The MSstats package implements statistical analysis for proteomics experiments using C++ via Rcpp and RcppArmadillo. Upgrading to C++14 enables access to more modern C++ language features and aligns the project with contemporary compiler standards, which are now widely supported across major platforms and build environments.
Changes
src/Makevarsto setCXX_STD = CXX14(previouslyCXX_STD = CXX11)src/Makevars.winwas not modified and remains at the previous standardUnit Tests
No unit tests were added or modified. The existing tinytest suite in
inst/tinytest/should continue to validate the package functionality under the new C++14 standard without requiring changes.Coding Guidelines
No coding guideline violations identified. The build configuration change is a standard practice for upgrading C++ compiler support and does not introduce any stylistic or structural concerns.