开发者

return a scope in C++

开发者 https://www.devze.com 2023-03-11 03:55 出处:网络
I encountered the following code in a file (looks like header file) iomanip of gcc 4.5.1: inline _Setbase

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

精彩评论

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