Slide 9
Slide 9 text
WJTJUPSͷվળɿϥϜμࣜ
1 template!
2 struct lambda_wrapped_visitor!
3 : public boost::static_visitor!
4 , public Lambda {!
5 !
6 lambda_wrapped_visitor(Lambda const& l) noexcept!
7 : Lambda(l)!
8 {}!
9 };!
10 !
11 template!
12 inline auto apply_lambda(Lambda const& l, boost::variant
const& variant)!
13 {!
14 return boost::apply_visitor(!
15 detail::lambda_wrapped_visitor()(std::declval()))!
18 >{l}!
19 , variant);!
20 }