Ubuntu の Mir の例をいくつか閲覧していたところ、理解できないコードに出くわしました。
struct DemoServerConfiguration : mir::DefaultServerConfiguration
{
" : mir::DefaultServerConfiguration "で何が起こっているのでしょうか?
その構造体の中にこれがあります
std::shared_ptr<msh::PlacementStrategy> the_shell_placement_strategy()
{
return shell_placement_strategy(
[this]
{
return std::make_shared<me::FullscreenPlacementStrategy>(the_display());
});
}
ここでも同じ話ですが、構文がわかりません。不明な部分は次のとおりです。
<msh::PlacementStrategy> the_shell_placement_strategy()
と
return shell_placement_strategy(
[this]
{
再び同じ構造体の内部
std::initializer_list<std::shared_ptr<mi::EventFilter> const> the_event_filters() override
{
return filter_list;
}
複数の <> <> <> が入れ子になっているのはなぜですか? なぜ the_event_filters() があるのですか?
そして最後の一枚
mir::run_mir(config, [&config, &wm](mir::DisplayServer&)
{
code
});
不明な部分
(config, [&config, &wm](mir::DisplayServer&)
);