Skip to content

Commit 942f80e

Browse files
author
Colin Robertson
authored
Merge branch 'master' into cr-started
2 parents 51598e8 + 02ec2e7 commit 942f80e

19 files changed

+182
-180
lines changed

docs/atl-mfc-shared/atl-mfc-shared-classes.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ Beginning with Visual C++ .NET 2002, several existing MFC utility classes were r
6363
[Microsoft Foundation Class Library (MFC) Reference](../mfc/mfc-desktop-applications.md)
6464
Provides reference material for the MFC Library, a set of classes in that constitute an application framework, which is the framework of an application written for the Windows API.
6565

66-
[NIB: Samples Included in Visual C++](http://msdn.microsoft.com/en-us/c9ec56b3-2bbd-49b4-8a4c-9ed4b78b7a84)
67-
Provides links to sample code showing the capabilities of Visual C++ and the libraries and technologies it supports.
68-
6966
[Visual C++ Libraries](http://msdn.microsoft.com/en-us/fec23c40-10c0-4857-9cdc-33a3b99b30ae)
7067
Provides links to the various libraries provided with Visual C++, including ATL, MFC, OLE DB Templates, the C run-time library, and the C++ Standard Library.
7168

docs/build/building-c-cpp-programs.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,5 @@ You can build Visual C++ projects either in Visual Studio or on the command line
6565
Describes how to set the Platform Toolset to target Windows XP development.
6666

6767
## Related Sections
68-
[NIB: Samples Included in Visual C++](http://msdn.microsoft.com/en-us/c9ec56b3-2bbd-49b4-8a4c-9ed4b78b7a84)
69-
Provides links to sample code that shows the capabilities of Visual C++ and the libraries and technologies it supports.
70-
7168
[Compiling and Building](/visualstudio/ide/compiling-and-building-in-visual-studio)
7269
Describes the Visual Studio build system and tools.

docs/build/reference/clr-common-language-runtime-compilation.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ Enables applications and components to use features from the common language run
7474
**/clr:safe**
7575
Produces an MSIL-only (no native executable code), verifiable output file. **/clr:safe** enables verification diagnostics ([PEVerify Tool (Peverify.exe)](http://msdn.microsoft.com/Library/f4f46f9e-8d08-4e66-a94b-0c69c9b0bbfa)).
7676

77-
For more information, see [NIB: Writing Verifiably Type-Safe Code](http://msdn.microsoft.com/en-us/d18f10ef-3b48-4f47-8726-96714021547b).
78-
77+
7978
/clr:safe is deprecated. A future version of the compiler may not support this option. We recommend that you port code that must be pure, verifiable MSIL to C#.
8079

8180
**/clr:noAssembly**

docs/c-language/typedef-declarations.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,5 @@ void box( int, int );
178178
```
179179

180180
## See Also
181-
[(NOTINBUILD)typedef Specifier](http://msdn.microsoft.com/en-us/cc96cf26-ba93-4179-951e-695d1f5fdcf1)
181+
182+

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

docs/cpp/storage-classes-cpp.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@ translation.priority.ht:
3737
- "zh-tw"
3838
---
3939
# Storage classes (C++)
40-
A *storage class* in the context of C++ variable declarations is a type specifier that governs the lifetime, linkage, and memory location of objects and. A given object can have only one storage class. Variables defined within a block have automatic storage unless otherwise specified using the `extern`, `static`, or `thread_local` specifiers. Automatic objects and variables have no linkage; they are not visible to code outside the block.
40+
A *storage class* in the context of C++ variable declarations is a type specifier that governs the lifetime, linkage, and memory location of objects. A given object can have only one storage class. Variables defined within a block have automatic storage unless otherwise specified using the `extern`, `static`, or `thread_local` specifiers. Automatic objects and variables have no linkage; they are not visible to code outside the block.
4141

4242
**Notes**
4343

4444
1. The [mutable](../cpp/mutable-data-members-cpp.md) keyword may be considered a storage class specifier. However, it is only available in the member list of a class definition.
4545

4646
2. Starting with [!INCLUDE[cpp_dev10_long](../build/includes/cpp_dev10_long_md.md)], the `auto` keyword is no longer a C++ storage-class specifier, and the `register` keyword is deprecated.
47+
48+
## In this section:
4749

4850
- [static](#static)
4951

@@ -60,7 +62,7 @@ A *storage class* in the context of C++ variable declarations is a type specifie
6062

6163
2. When you declare a variable in a function, the `static` keyword specifies that the variable retains its state between calls to that function.
6264

63-
3. When you declare a data member in a class declaration, the `static` keyword specifies that one copy of the member is shared by all instances of the class. A static data member must be defined at file scope. An integral data member that you declare as `const``static` can have an initializer.
65+
3. When you declare a data member in a class declaration, the `static` keyword specifies that one copy of the member is shared by all instances of the class. A static data member must be defined at file scope. An integral data member that you declare as `const static` can have an initializer.
6466

6567
4. When you declare a member function in a class declaration, the `static` keyword specifies that the function is shared by all instances of the class. A static member function cannot access an instance member because the function does not have an implicit `this` pointer. To access an instance member, declare the function with a parameter that is an instance pointer or reference.
6668

@@ -199,29 +201,31 @@ int main() {
199201
A variable declared with the `thread_local` specifier is accessible only on the thread on which it is created. The variable is created when the thread is created, and destroyed when the thread is destroyed. Each thread has its own copy of the variable. On Windows, `thread_local` is functionally equivalent to the Microsoft-specific [__declspec( thread )](../cpp/thread.md) attribute.
200202

201203
```
202-
thread_local float f = 42.0; //global namespace
204+
thread_local float f = 42.0; // Global namespace. Not implicitly static.
203205
204206
struct C // cannot be applied to type definition
205207
{
206-
thread_local int i; //local
207-
thread_local static char buf[10]; // local and static
208+
thread_local int i; // Illegal. The member must be static.
209+
thread_local static char buf[10]; // OK
208210
};
209211
210212
void DoSomething()
211213
{
212-
thread_local C my_struct; // Apply thread_local to a variable
214+
// Apply thread_local to a local variable.
215+
// Implicitly “thread_local static C my_struct”.
216+
thread_local C my_struct;
213217
}
214218
```
215219

216220
1. The thread_local specifier may be combined with `static` or `extern`.
217221

218-
2. You can apply `thread_local` only to data declarations and definitions; **thread_local** cannot be used on function declarations or definitions.
222+
2. You can apply `thread_local` only to data declarations and definitions; `thread_local` cannot be used on function declarations or definitions.
219223

220-
3. The use of `thread_local` may interfere with [delay loading](../build/reference/linker-support-for-delay-loaded-dlls.md) of DLL imports**.**
224+
3. The use of `thread_local` may interfere with [delay loading](../build/reference/linker-support-for-delay-loaded-dlls.md) of DLL imports.
221225

222226
4. On XP systems, `thread_local` may not function correctly if a DLL uses `thread_local` data and it is loaded dynamically via LoadLibrary.
223227

224-
5. You can specify `thread_local` only on data items with static storage duration. This includes global data objects (both **static** and `extern`), local static objects, and static data members of classes. You cannot declare automatic data objects with **thread_local**.
228+
5. You can specify `thread_local` only on data items with static storage duration. This includes global data objects (both `static` and `extern`), local static objects, and static data members of classes. Any local variable declared `thread_local` will be implicitly static if no other storage class is provided; in other words, at block scope `thread_local` is equivalent to `thread_local static`.
225229

226230
6. You must specify `thread_local` for both the declaration and the definition of a thread local object, whether the declaration and definition occur in the same file or separate files.
227231

docs/cppcx/dlls-c-cx.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,5 @@ You can use Visual Studio to create either a standard Win32 DLL or a [!INCLUDE[w
6666
3. In your source code files, add a `#include` statement for the DLL header file, as needed.
6767

6868
## See Also
69-
[(NOTINBUILD) Advanced Topics](http://msdn.microsoft.com/en-us/1ccff0cf-a6cc-47ef-a05f-eba6307b3ced)
69+
70+

0 commit comments

Comments
 (0)