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; };
精彩评论