Files
qt-creator/tests/auto/cplusplus/cxx11/data/braceInitializers.3.cpp
Christian Kamm e85c6f4b38 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-16 20:06:58 +02:00

8 lines
132 B
C++

auto x = int{};
auto y = Foo{};
auto z = typename Foo<T>{};
auto a = Foo<T>{};
auto d = new C(1, abc...);
auto e = new C{1, 2, 3};