MCPcopy Create free account
hub / github.com/Simple-Robotics/Simple / lambda_visitor

Class lambda_visitor

include/simple/utils/visitors.hpp:60–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 // It is an additional class to avoid diamond inheritance
59 template<typename ReturnType, typename... Lambdas>
60 struct lambda_visitor
61 : boost::static_visitor<ReturnType>
62 , lambda_visitor_helper<ReturnType, Lambdas...>
63 {
64 typedef lambda_visitor_helper<ReturnType, Lambdas...> Helper;
65
66 lambda_visitor(Lambdas... lambdas)
67 : Helper(lambdas...)
68 {
69 }
70
71 using Helper::operator();
72 };
73
74 // Wrapper function to create a lambda_visitor instance.
75 // This deduces the template arguments automatically, so you don't need to specify them.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected