You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cpp-conformance-improvements-2017.md
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -285,6 +285,13 @@ namespace
285
285
}
286
286
```
287
287
288
+
### Classes declared in anonymous namespaces
289
+
According to the C++ standard, a class declared inside an anonymous namespace has internal linkage, and therefore cannot be exported. In Visual Studio 2015 and earlier, this rule was not enforced. In Visual Studio 2017 the rule is partially enforced. The following example raises this error in Visual Studio 2017: "error C2201: 'const `anonymous namespace'::S1::`vftable'': must have external linkage in order to be exported/imported."
### Default initializers for value class members (C++/CLI)
289
296
In Visual Studio 2015 and earlier, the compiler permitted (but ignored) a default member initializer for a member of a value class. Default initialization of a value class always zero-initializes the members; a default constructor is not permitted. In Visual Studio 2017, default member initializers raise a compiler error, as shown in this example:
Copy file name to clipboardExpand all lines: docs/cppcx/platform-box-class.md
+22-39Lines changed: 22 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -32,10 +32,17 @@ ref class Box abstract;
32
32
**Header:** vccorlib.h
33
33
34
34
**Namespace:** Platform
35
-
36
-
## Box::Box Constructor
37
-
Creates a `Box` that can encapsulate a value of the specified type.
38
-
35
+
|Member|Description|
36
+
|------------|-----------------|
37
+
|[Box Constructor](#ctor)|Creates a `Box` that can encapsulate a value of the specified type.|
38
+
|[operator Box<const T>^](#box-const-t)|Enables boxing conversions from a `const` value class `T` or `enum` class `T` to `Box<T>`.|
39
+
|[operator Box<const volatile T>^](#box-const-volatile-t)|Enables boxing conversions from a `const volatile` value class `T` or `enum` type `T` to `Box<T>`. |
40
+
|[operator Box<T>^](#box-t)|Enables boxing conversions from a value class `T` to `Box<T>`.|
41
+
|[operator Box<volatile T>^](#box-volatile-t)|Enables boxing conversions from a `volatile` value class `T` or `enum` type `T` to `Box<T>`.|
42
+
|[Box::operator T](#t)|Enables boxing conversions from a value class `T` or `enum` class `T` to `Box<T>`.|
43
+
## <a name="ctor"></a> Box::Box Constructor
44
+
Creates a `Box` that can encapsulate a value of the specified type.|
45
+
|[Value property](#value)|Returns the value that is encapsulated in the `Box` object.|
39
46
### Syntax
40
47
41
48
```cpp
@@ -47,7 +54,7 @@ Box(T valueArg);
47
54
The type of value to be boxed—for example, `int`, `bool`, `float64`, `DateTime`.
0 commit comments