Skip to content

Commit 3742c16

Browse files
mikeblomeColin Robertson
authored andcommitted
fixed typo and indents in conformance topic (MicrosoftDocs#267)
1 parent 91db50b commit 3742c16

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/cpp-conformance-improvements-2017.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -355,12 +355,12 @@ In previous versions of Visual Studio, the compiler in some cases would fail to
355355
```cpp
356356
template<typename T>
357357
struct S {
358-
template<typename U> static int f() = delete;
358+
template<typename U> static int f() = delete;
359359
};
360360

361361
void g()
362362
{
363-
decltype(S<int>::f<int>()) i; // this should fail
363+
decltype(S<int>::f<int>()) i; // this should fail
364364
}
365365
```
366366
To fix the error, declare i as `int`.
@@ -385,16 +385,16 @@ Now the compiler will emit a warning if it can know at compile time that a nativ
385385
class A
386386
{
387387
public:
388-
A() : p_(new int) {}
389-
~A() { delete p_; }
388+
A() : p_(new int) {}
389+
~A() { delete p_; }
390390

391-
A(A const &) = delete;
392-
A(A &&rhs) {
393-
p_ = rhs.p_;
391+
A(A const &) = delete;
392+
A(A &&rhs) {
393+
p_ = rhs.p_;
394394
}
395395

396396
private:
397-
int *p_;
397+
int *p_;
398398
};
399399

400400
#pragma unmanaged
@@ -559,7 +559,7 @@ void h()
559559
g(42);
560560
}
561561
```
562-
### Unitialized const variables
562+
### Uninitialized const variables
563563
Visual Studio 2017 RTW release had a regression in which the C++ compiler would not issue a diagnostic if a 'const' variable was not initialized. This regression has been fixed in Visual Studio 2017 Update 1. The following code now produces "warning C4132: 'Value': const object should be initialized":
564564

565565
```cpp

0 commit comments

Comments
 (0)