Clang 3.3 and C++14 support?

user1368198

Clang 3.3 supports some C++14 features, like member initializers and aggregates. However, I am unable to compile this code even with -std=c++11 switch.

struct A
{
   struct X { int a, b; };
   X x = { 1, 2 };
   int n;
};

A a = {{10}, 5};

What am I doing wrong?

Sergey K.

Post-C++11 language features in Clang 3.3 are enabled with this command-line switch:

-std=c++1y

Check out the bottom of this page http://clang.llvm.org/cxx_status.html for the list of currently supported post-C++11 features in Clang 3.3.

Also, here you will find discussions on the upcoming C++14 and usage examples: http://www.meetingcpp.com/index.php/br/items/a-look-at-cpp14-papers-part-1.html

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

C++14 support in QtCreator with Clang

From Dev

Does Unreal Engine 4 toolset support C++11 or C++14 on OS X / Clang?

From Dev

golang: CGO / clang with sqlite3.c

From Dev

Enabling C++14 in clang in Visual Studio

From Dev

Compiling program as c++ 14 in Sublime Text 3 as default

From Dev

Compiling program as c++ 14 in Sublime Text 3 as default

From Dev

Enable C++14 support in CLion?

From Dev

Support of std::cbegin() in C++14

From Dev

Is this a bug in g++ c++14 support?

From Dev

Will C++14 support unconstrained generic functions?

From Dev

ros packages with C++14 lambda support

From Dev

ros packages with C++14 lambda support

From Dev

Python 3 support for fabric

From Dev

Does Dart support the W3C File API standard?

From Dev

support level for w3c specifications for different broswers

From Dev

UTFGrid Support or Example for OpenLayers 3

From Dev

Check requirements for python 3 support

From Dev

Bootstrap 3 legacy browser support?

From Dev

Sublime Text 3 support for Rust

From Dev

Does Vertx 3 support CompletableFuture?

From Dev

Sass support for sublime text 3

From Dev

Smarty support for Aptana Studio 3

From Dev

Bootstrap 3 legacy browser support?

From Dev

How to build Qt 5 from source with c++14 support

From Dev

Does OS X 10.7 libc++ support c++14?

From Dev

configure needs C++14 support but gcc -v = 4.9.3

From Dev

How does Apple clang-703.0.29 map back to clang releases in terms of C++1x support?

From Dev

How to improve the efficiency of "str1 + str2 + str3 + ..." in C++14?

From Dev

Can't understand the declaration #3 in the Example of [basic.link]/6 C++14