2

求教一个 cpp 语法问题

 3 years ago
source link: https://www.v2ex.com/t/800403
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  程序员

求教一个 cpp 语法问题

  jdz · 6 小时 32 分钟前 · 488 次点击
https://github.com/envoyproxy/envoy-filter-example/blob/main/echo2_config.cc#L20 这一行中的 “Network::ReadFilterSharedPtr{new Filter::Echo2()}” 为什么大括号是合法的呢?
4 条回复    2021-09-07 15:19:40 +08:00

jdz   6 小时 30 分钟前

ReadFilterSharedPtr 是一个智能指针 using ReadFilterSharedPtr = std::shared_ptr<ReadFilter>;


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK