码迷,mamicode.com
首页 > 编程语言 > 详细

c++builder XE7 新语法

时间:2014-09-20 17:00:59      阅读:174      评论:0      收藏:0      [点我收藏+]

标签:des   style   http   io   ar   strong   for   div   sp   

Non-static data member initializers

非静态成员变量初始化变得简单

As a simple example,

    class A {
    public:
        int a = 7;
    };

would be equivalent to

    class A {
    public:
        A() : a(7) {}
    };

http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2008/n2756.htm
C++11 Features Supported by RAD Studio Clang-based C++ Compilers
http://docwiki.embarcadero.com/RADStudio/XE7/en/C%2B%2B11_Features_Supported_by_RAD_Studio_Clang-based_C%2B%2B_Compilers


Multi-declarator auto

The C++11 standard includes the multi-variable form of auto declarations, such as:

int* func(){}
 
int _tmain(int argc, _TCHAR* argv[])
{
        auto x = 3, * y = func(), z = 4;
        return 0;
}


c++builder XE7 新语法

标签:des   style   http   io   ar   strong   for   div   sp   

原文地址:http://www.cnblogs.com/cb168/p/3983302.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!