首页 > 编程语言 > 详细

c++builder XE7 新语法

时间:2014-09-20 15:35:30      阅读:449      评论:0      收藏:0      [点我收藏+]

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 新语法

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!