Skip to content

Bump C++ standard to C++23 - #13

Merged
manumerous merged 1 commit into
mainfrom
cxx23-bump
Sep 28, 2026
Merged

manumerous merged 1 commit into
mainfrom
cxx23-bump

Conversation

@manumerous

Copy link
Copy Markdown
Owner

Summary

  • Bumps OCS2's own Bazel copts (OCS2_COPTS, OCS2_TEST_COPTS, OCS2_ROS2_COPTS in bazel/ocs2_cxx_flags.bzl) from the previous C++14/C++17 split to -std=c++23 across the board, and updates the accompanying comments in .bazelrc and ocs2_pinocchio/ocs2_pinocchio_interface/BUILD.bazel to match.
  • The C++14/C++17 split existed only because gtest and rclcpp/rosidl headers required at least C++17 while the solver core stayed on C++14 to match the original CMake build; now that everything is on C++23, that split is no longer load-bearing (the three copts lists are kept as separate names for future flexibility, but currently resolve to the same standard).
  • External dependencies (Eigen, Boost, googletest, ROS2 packages, etc.) are untouched — no repo-wide --cxxopt is set, so they stay on their own toolchain default.

Test plan

  • bazel build //... — full build succeeds (9488 actions, only pre-existing -Wsign-compare/-Wunused-variable warnings)
  • bazel test //... — 32/32 tests pass
  • Verified on GCC 13.3.0 (Ubuntu 24.04)

OCS2_COPTS, OCS2_TEST_COPTS, and OCS2_ROS2_COPTS all now build at
-std=c++23 instead of the previous c++14/c++17 split. Verified with a
full bazel build //... and bazel test //... (32/32 tests pass) on
GCC 13.3.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@manumerous
manumerous merged commit 1071e34 into main Sep 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant