Logo
Explore Help
Sign In
feedc0de/qt-creator
1
0
Fork 0
You've already forked qt-creator
forked from qt-creator/qt-creator
Code Pull Requests Activity
Files
56aadc407d7becadec794e660ae7d7c20e820e0c
qt-creator/tests/auto/cplusplus/cxx11/data/braceInitializers.3.cpp

8 lines
132 B
C++
Raw Normal View History

C++11: Allow for typename Foo<T>{}, Foo{} and int{}. As a postfix expression. Change-Id: I65cae0571080a9fb699af61c661328ef06f97890 Reviewed-by: hjk <qthjk@ovi.com>
2012-09-19 10:26:07 +02:00
auto x = int{};
auto y = Foo{};
auto z = typename Foo<T>{};
C++11: Fix parsing of expressions like vector<int>{1}. The parser considers '{' an operator and thus thought "template-id {" couldn't possibly be valid. This patch adds '{' as an exception to the rule. Change-Id: I40730fcdc5cade48566b4c8b6fde390f455bbdba Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-06-04 16:18:16 +02:00
auto a = Foo<T>{};
C++11: More (expression-list) or brace-init-list. This time in the 'new' expression. Changed it to make new C(1, abc...) and new C{1, abc} work. Change-Id: I7232798fd083b653ee04ef9ede386d6536133e16 Reviewed-by: hjk <qthjk@ovi.com>
2012-09-19 11:26:33 +02:00
auto d = new C(1, abc...);
auto e = new C{1, 2, 3};
Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 66ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API