TechTheTime-HighLevel 0.0.1
The high level robot's code using ros2-foxy for the robotics competition(Erobot-2022)
struct_wrapper.hpp
Go to the documentation of this file.
1#ifndef STRUCT_INIT_HPP
2#define STRUCT_INIT_HPP
3
4template<typename T, typename... Ts>
6 using type = T;
7
8 std::shared_ptr<T> value;
9
11 this->value = std::make_shared<T>();
12 }
13
14 void set_values(Ts... args) {
15 T tmp = T(args...);
16 *value = tmp;
17 }
18};
19
20#endif
Definition: struct_wrapper.hpp:5
void set_values(Ts... args)
Definition: struct_wrapper.hpp:14
std::shared_ptr< T > value
Definition: struct_wrapper.hpp:8
T type
Definition: struct_wrapper.hpp:6
struct_wrapper()
Definition: struct_wrapper.hpp:10