首页
话题
动态
专家
文章
作者
公告
更多
积分规则
登录 或 注册
首页
话题
动态
专家
文章
作者
公告
积分规则
发表新帖
发表新帖
What is this crazy C++11 syntax ==> struct : bar {} foo {};?
后端
未结
关注
2
481
感动是毒
2020-12-07 07:17
What could this possibly mean in C++11?
struct : bar {} foo {};
2条回答
囚心锁ツ
(楼主)
2020-12-07 07:26
This defines:
an anonymous struct,
which is derived publicly from
bar
which (
anonymously
) defines nothing else but what it derived from
bar
and finally, an instance, called "foo" is created,
with an empty initializer list
struct : bar {} foo {};
0
讨论(0)
查看其它2个回答
发布评论:
提交评论
加载中...
验证码
看不清?
提交回复
热议问题