Skip to content

add missing header for std::function - #3211

Merged
ahcorde merged 1 commit into
ros2:humblefrom
nim65s:humble-functional
Jul 23, 2026
Merged

add missing header for std::function#3211
ahcorde merged 1 commit into
ros2:humblefrom
nim65s:humble-functional

Conversation

@nim65s

@nim65s nim65s commented Jul 22, 2026

Copy link
Copy Markdown

Description

fix play_motion2 on nix:

[ 60%] Built target ament_cmake_python_build_play_motion2_egg
In file included from /build/play_motion2-release-release-humble-play_motion2-1.8.5-1/src/utils/motion_loader.hpp:23,
                 from /build/play_motion2-release-release-humble-play_motion2-1.8.5-1/src/utils/motion_loader.cpp:19:
/nix/store/ifw8313yfmyarrgqscg249m9krx58sh2-ros-humble-rclcpp-16.0.19-r1/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface.hpp:42:10: error: 'function' in namespace 'std' does not name a template type
   42 |     std::function<
      |          ^~~~~~~~
/nix/store/ifw8313yfmyarrgqscg249m9krx58sh2-ros-humble-rclcpp-16.0.19-r1/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface.hpp:30:1: note: 'std::function' is defined in header '<functional>'; this is probably fixable by adding '#include <functional>'
   29 | #include "rclcpp/parameter.hpp"
  +++ |+#include <functional>
   30 | #include "rclcpp/visibility_control.hpp"

Is this user-facing behavior change?

no

Did you use Generative AI?

no

Additional Information

already fixed in rolling: #2018, but still breaks when building humble with a recent compiler.

@mergify

mergify Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

fix play_motion2 on nix:

```cpp
[ 60%] Built target ament_cmake_python_build_play_motion2_egg
In file included from /build/play_motion2-release-release-humble-play_motion2-1.8.5-1/src/utils/motion_loader.hpp:23,
                 from /build/play_motion2-release-release-humble-play_motion2-1.8.5-1/src/utils/motion_loader.cpp:19:
/nix/store/ifw8313yfmyarrgqscg249m9krx58sh2-ros-humble-rclcpp-16.0.19-r1/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface.hpp:42:10: error: 'function' in namespace 'std' does not name a template type
   42 |     std::function<
      |          ^~~~~~~~
/nix/store/ifw8313yfmyarrgqscg249m9krx58sh2-ros-humble-rclcpp-16.0.19-r1/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface.hpp:30:1: note: 'std::function' is defined in header '<functional>'; this is probably fixable by adding '#include <functional>'
   29 | #include "rclcpp/parameter.hpp"
  +++ |+#include <functional>
   30 | #include "rclcpp/visibility_control.hpp"
```

already fixed in rolling: ros2#2018

Signed-off-by: Guilhem Saurel <guilhem.saurel@laas.fr>
@nim65s
nim65s force-pushed the humble-functional branch from 64dcb5d to 040b575 Compare July 22, 2026 11:49
@ahcorde

ahcorde commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Pulls: #3211
Gist: https://gist.githubusercontent.com/ahcorde/57306b199867608cdd681e62cc6f4b74/raw/55315fd6cc79e216afdd62e8fe1bc73f49495a87/ros2.repos
BUILD args: --packages-above-and-dependencies rclcpp
TEST args: --packages-above rclcpp
ROS Distro: humble
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/19933

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@ahcorde
ahcorde merged commit a8d65c1 into ros2:humble Jul 23, 2026
3 checks passed
@nim65s
nim65s deleted the humble-functional branch July 23, 2026 17:12
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.

2 participants