Skip to content

Commit 8a2d8ed

Browse files
author
Michael Blome
committed
typos in conformance doc
1 parent 56d3456 commit 8a2d8ed

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

docs/top/cpp-conformance-improvements-2017.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ translation.priority.ht:
3232
# C++ conformance improvements in [!INCLUDE[vs_dev15_md](../misc/includes/vs_dev15_md.md)]
3333

3434
## New language features
35-
ith support for generalized constexpr and NSDMI for aggregates, the compiler is complete for features added in the C++14 Standard. Note that the compiler still lacks a few features from the C++11 and C++98 Standards.
35+
With support for generalized constexpr and NSDMI for aggregates, the compiler is now complete for features added in the C++14 Standard. Note that the compiler still lacks a few features from the C++11 and C++98 Standards.
3636

3737
### C++11:
3838
**Expression SFINAE (via more libraries) support in more libraries**
39-
The Visual C++ compiler is now capable continues to improve its support for expression SFINAE, which is required for template argument deduction and substitution where decltype and constexpr expressions may appear as template parameters. For more information, see [Expression SFINAE improvements in VS 2015 Update 3](https://blogs.msdn.microsoft.com/vcblog/2016/06/07/expression-sfinae-improvements-in-vs-2015-update-3).
39+
The Visual C++ compiler continues to improve its support for expression SFINAE, which is required for template argument deduction and substitution where decltype and constexpr expressions may appear as template parameters. For more information, see [Expression SFINAE improvements in VS 2015 Update 3](https://blogs.msdn.microsoft.com/vcblog/2016/06/07/expression-sfinae-improvements-in-vs-2015-update-3).
4040

4141

4242
### C++ 14:
@@ -46,7 +46,7 @@ An aggregate is an array or a class with no user-provided constructor, no privat
4646
**Extended constexpr**
4747
Expressions declared as constexpr are now allowed to contain certain kinds of declarations, if and switch statements, loop statements, and mutation of objects whose lifetime began within the constexpr expression evaluation. Also, there is no longer a requirement that a constexpr non-static member function be implicitly const. For more information, see [Relaxing constraints on constexpr functions](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3652.html).
4848

49-
### C++17 (available with /std:c++latest):
49+
### C++17:
5050
**Terse static_assert** (available with /std:c++latest)
5151
In C++17 the message parameter for static_assert is optional. For more information, see [Extending static_assert, v2](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3928.pdf).
5252

@@ -62,6 +62,7 @@ For the complete list of conformance improvements up through Visual Studio 2015,
6262
## Bug fixes
6363
### Copy-list-initialization
6464
Visual Studio 2017 correctly raises compiler errors related to object creation using initializer lists that were not caught in Visual Studio 2015 and could lead to crashes or undefined runtime behavior. In copy-list-initialization, the compiler is required to consider an explicit constructor for overload resolution, but must raise an error if that overload is actually chosen.
65+
6566
The following two examples compile in Visual Studio 2015 but not in Visual Studio 2017.
6667
```cpp
6768
struct A
@@ -188,7 +189,7 @@ int main()
188189
// as an argument to a variadic function
189190
}
190191
```
191-
To correct the error, you can callC2672 a member function that returns a trivially copyable type,
192+
To correct the error, you can call a member function that returns a trivially copyable type,
192193

193194
```cpp
194195
std::atomic<int> i(0);
@@ -200,6 +201,7 @@ or else perform a static cast to convert the object before passing it:
200201
printf("%i\n", static_cast<int>(s))
201202
```
202203
For strings built and managed using CStringW, the provided ‘operator LPCWSTR()’ should be used to cast a CStringW object to the C pointer expected by the format string.
204+
203205
```cpp
204206
CStringW str1;
205207
CStringW str2;
@@ -245,13 +247,15 @@ In Visual Studio 2015 and earlier, the compiler did not diagnose missing templat
245247
```cpp
246248
template <class T> class ListNode;
247249
template <class T> using ListNodeMember = ListNode<T> T::*;
248-
template <class T, ListNodeMember M> class ListHead; // C2955: 'ListNodeMember': use of alias template requires template argument list
250+
template <class T, ListNodeMember M> class ListHead; // C2955: 'ListNodeMember': use of alias
251+
// template requires template argument list
249252

250253
// correct: template <class T, ListNodeMember<T> M> class ListHead;
251254
```
252255
253256
### Expression-SFINAE
254-
As part of supporting expression-SFINAE the compiler now parses decltype arguments when the templates are declared rather than instantiated. Consequently, if a non-dependent specialization is found in the decltype argument, it will not be deferred to instantiation-time and will be processed immediately and any resulting errors will be diagnosed at that time.
257+
To support expression-SFINAE, the compiler now parses decltype arguments when the templates are declared rather than instantiated. Consequently, if a non-dependent specialization is found in the decltype argument, it will not be deferred to instantiation-time and will be processed immediately and any resulting errors will be diagnosed at that time.
258+
255259
The following example shows such a compiler error that is raised at the point of declaration:
256260
257261
```cpp
@@ -279,7 +283,8 @@ In Visual Studio 2015 and earlier, the compiler permitted (but ignored) a defaul
279283
```cpp
280284
value struct V
281285
{
282-
int i = 0; // error C3446: 'V::i': a default member initializer is not allowed for a member of a value class
286+
int i = 0; // error C3446: 'V::i': a default member initializer
287+
// is not allowed for a member of a value class
283288
};
284289
```
285290

0 commit comments

Comments
 (0)