开发者

return a scope in C++

I encountered the following code in a file (looks like header file) iomanip of gcc 4.5.1:

inline _Setbase  
setbase(int __base)  
{ return { __base }; }  

what is the language definition of returning开发者_开发问答 a scope (block)?


Looks like the new syntax for Uniform initialization in C++0x to me.


This isn't returning a block. This constructs an object of type _Setbase, defined in the same header file as

struct _Setbase { int _M_base; };
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜