rclcpp  master
C++ ROS Client Library API
Classes | Namespaces | Macros | Functions
scope_exit.hpp File Reference
#include <functional>
#include "rclcpp/macros.hpp"
Include dependency graph for scope_exit.hpp:

Go to the source code of this file.

Classes

struct  rclcpp::ScopeExit< Callable >
 

Namespaces

 rclcpp
 This header provides the get_node_base_interface() template function.
 

Macros

#define RCLCPP_SCOPE_EXIT(code)   auto RCLCPP_STRING_JOIN(scope_exit_, __LINE__) = rclcpp::make_scope_exit([&]() {code;})
 

Functions

template<typename Callable >
ScopeExit< Callable > rclcpp::make_scope_exit (Callable callable)
 

Macro Definition Documentation

◆ RCLCPP_SCOPE_EXIT

#define RCLCPP_SCOPE_EXIT (   code)    auto RCLCPP_STRING_JOIN(scope_exit_, __LINE__) = rclcpp::make_scope_exit([&]() {code;})