C++ Language Changes in Clang
-----------------------------
-- ...
+- Clang now enforces the rule that a *using-declaration* cannot name an enumerator of a
+ scoped enumeration.
+
+ .. codeblock:: c++
+
+ namespace Foo { enum class E { e }; }
+ namespace Bar {
+ using Foo::E::e; // error
+ constexpr auto e = Foo::E::e; // ok
+ }
+
+- Clang now enforces the rule that an enumerator of an unscoped enumeration declared at
+ class scope can only be named by a *using-declaration* in a derived class.
+
+ .. codeblock:: c++
-C++11 Feature Support
+ class Foo { enum E { e }; }
+ using Foo::e; // error
+ static constexpr auto e = Foo::e; // ok
+
+...
+
+C++1z Feature Support
^^^^^^^^^^^^^^^^^^^^^
+Clang's experimental support for the upcoming C++1z standard can be enabled with ``-std=c++1z``.
+Changes to C++1z features since Clang 3.8:
+
+- The ``[[fallthrough]]``, ``[[nodiscard]]``, and ``[[maybe_unused]]`` attributes are
+ supported in C++11 onwards, and are largely synonymous with Clang's existing attributes
+ ``[[clang::fallthrough]]``, ``[[gnu::warn_unused_result]]``, and ``[[gnu::unused]]``.
+ Use ``-Wimplicit-fallthrough`` to warn on unannotated fallthrough within ``switch``
+ statements.
+
+- In C++1z mode, aggregate initialization can be performed for classes with base classes:
+
+ .. codeblock:: c++
+
+ struct A { int n; };
+ struct B : A { int x, y; };
+ B b = { 1, 2, 3 }; // b.n == 1, b.x == 2, b.y == 3
+
+- The range in a range-based ``for`` statement can have different types for its ``begin``
+ and ``end`` iterators. This is permitted as an extension in C++11 onwards.
+
+- Lambda-expressions can explicitly capture ``*this`` (to capture the surrounding object
+ by copy). This is permitted as an extension in C++11 onwards.
+
+- Objects of enumeration type can be direct-list-initialized from a value of the underlying
+ type. ``E{n}`` is equivalent to ``E(n)``, except that it implies a check for a narrowing
+ conversion.
+
+- Unary *fold-expression*\s over an empty pack are now rejected for all operators
+ other than ``&&``, ``||``, and ``,``.
+
...
Objective-C Language Changes in Clang