diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3052.md b/docs/error-messages/compiler-errors-2/compiler-error-c3052.md index 2eaaa54788..57d7f03c1d 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3052.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3052.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3052" title: "Compiler Error C3052" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3052" +ms.date: 11/04/2016 f1_keywords: ["C3052"] helpviewer_keywords: ["C3052"] -ms.assetid: 87480c42-1ceb-4775-8d20-88c54a7bb6a6 --- # Compiler Error C3052 -'var' : variable doesn't appear in a data-sharing clause under a default(none) clause +> 'var' : variable doesn't appear in a data-sharing clause under a default(none) clause + +## Remarks If [default(none)](../../parallel/openmp/reference/openmp-clauses.md#default-openmp) is used, any variable used in the structured block must be explicitly specified as either [shared](../../parallel/openmp/reference/openmp-clauses.md#shared-openmp) or [private](../../parallel/openmp/reference/openmp-clauses.md#private-openmp). -The following sample generates C3052: +## Example + +The following example generates C3052: ```cpp // C3052.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3053.md b/docs/error-messages/compiler-errors-2/compiler-error-c3053.md index e2ca423379..62bcc0b305 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3053.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3053.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3053" title: "Compiler Error C3053" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3053" +ms.date: 11/04/2016 f1_keywords: ["C3053"] helpviewer_keywords: ["C3053"] -ms.assetid: ab9a25f3-e341-4f6e-8e69-069b4a963a64 --- # Compiler Error C3053 -'symbol' : 'threadprivate' is only valid for global or static data items +> 'symbol' : 'threadprivate' is only valid for global or static data items + +## Remarks Symbols passed to [threadprivate](../../parallel/openmp/reference/openmp-directives.md#threadprivate) must either be global or static. -The following sample generates C3053: +## Example + +The following example generates C3053: ```cpp // C3053.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3054.md b/docs/error-messages/compiler-errors-2/compiler-error-c3054.md index 4961c563e5..be1a516fcf 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3054.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3054.md @@ -1,10 +1,9 @@ --- -description: "Learn more about: Compiler Error C3054" title: "Compiler Error C3054" +description: "Learn more about: Compiler Error C3054" ms.date: 06/01/2022 f1_keywords: ["C3054"] helpviewer_keywords: ["C3054"] -ms.assetid: 6f4b7ac5-0d12-474b-b611-76ff26ee41ac --- # Compiler Error C3054 @@ -18,7 +17,7 @@ This error is obsolete in Visual Studio 2022 and later versions. ## Example -The following sample generates C3054. +The following example generates C3054. ```cpp // C3054.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3055.md b/docs/error-messages/compiler-errors-2/compiler-error-c3055.md index a3e046633f..c27fbebbe5 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3055.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3055.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3055" title: "Compiler Error C3055" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3055" +ms.date: 11/04/2016 f1_keywords: ["C3055"] helpviewer_keywords: ["C3055"] -ms.assetid: 60446ee0-18dd-48fc-9059-f0a14229dce8 --- # Compiler Error C3055 -'symbol' : symbol cannot be referenced before it is used in 'threadprivate' directive +> 'symbol' : symbol cannot be referenced before it is used in 'threadprivate' directive + +## Remarks A symbol was referenced and then used in a [threadprivate](../../parallel/openmp/reference/openmp-directives.md#threadprivate) clause, which is not allowed. -The following sample generates C3055: +## Example + +The following example generates C3055: ```cpp // C3055.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3056.md b/docs/error-messages/compiler-errors-2/compiler-error-c3056.md index cf9e92e01a..48b72cc346 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3056.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3056.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3056" title: "Compiler Error C3056" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3056" +ms.date: 11/04/2016 f1_keywords: ["C3056"] helpviewer_keywords: ["C3056"] -ms.assetid: 9500173d-870b-49b3-8e88-0ee93586d19a --- # Compiler Error C3056 -'symbol' : symbol is not in the same scope with 'threadprivate' directive +> 'symbol' : symbol is not in the same scope with 'threadprivate' directive + +## Remarks A symbol used in a [threadprivate](../../parallel/openmp/reference/openmp-directives.md#threadprivate) clause must be in the same scope as the `threadprivate` clause. -The following sample generates C3056: +## Example + +The following example generates C3056: ```cpp // C3056.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3057.md b/docs/error-messages/compiler-errors-2/compiler-error-c3057.md index e2b10e3f31..009ad60d67 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3057.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3057.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3057" title: "Compiler Error C3057" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3057" +ms.date: 11/04/2016 f1_keywords: ["C3057"] helpviewer_keywords: ["C3057"] -ms.assetid: b0b2ba88-9c74-4bec-bf60-8fc72eade34c --- # Compiler Error C3057 -'symbol' : dynamic initialization of 'threadprivate' symbols is not currently supported +> 'symbol' : dynamic initialization of 'threadprivate' symbols is not currently supported + +## Remarks The initialized value of a symbol used in a [threadprivate](../../parallel/openmp/reference/openmp-directives.md#threadprivate) clause must be known at compile time. -The following sample generates C3057: +## Examples + +The following example generates C3057: ```cpp // C3057.cpp @@ -38,7 +41,7 @@ int main() { } ``` -The following sample generates C3057: +The following example generates C3057: ```cpp // C3057b.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3058.md b/docs/error-messages/compiler-errors-2/compiler-error-c3058.md index 2e52864c0d..b02ea0b7cd 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3058.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3058.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3058" title: "Compiler Error C3058" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3058" +ms.date: 11/04/2016 f1_keywords: ["C3058"] helpviewer_keywords: ["C3058"] -ms.assetid: 669d08c8-0b58-4351-88aa-c6e6e1af481c --- # Compiler Error C3058 -'symbol' : symbol not declared as 'threadprivate' before it is used in the 'copyin' clause +> 'symbol' : symbol not declared as 'threadprivate' before it is used in the 'copyin' clause + +## Remarks A symbol must first be declared [threadprivate](../../parallel/openmp/reference/openmp-directives.md#threadprivate) before it can be used in a [copyin](../../parallel/openmp/reference/openmp-clauses.md#copyin) clause. -The following sample generates C3058: +## Example + +The following example generates C3058: ```cpp // C3058.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3059.md b/docs/error-messages/compiler-errors-2/compiler-error-c3059.md index 0385160ecf..d7518ccc87 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3059.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3059.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3059" title: "Compiler Error C3059" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3059" +ms.date: 11/04/2016 f1_keywords: ["C3059"] helpviewer_keywords: ["C3059"] -ms.assetid: 57220324-8286-4cab-a1ab-45385eb1eae0 --- # Compiler Error C3059 -'var' : 'threadprivate' symbol cannot be used in the 'clause' clause +> 'var' : 'threadprivate' symbol cannot be used in the 'clause' clause + +## Remarks A [threadprivate](../../parallel/openmp/reference/openmp-directives.md#threadprivate) symbol was used in a clause. -The following sample generates C3059: +## Example + +The following example generates C3059: ```cpp // C3059.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3060.md b/docs/error-messages/compiler-errors-2/compiler-error-c3060.md index 5668709310..1745f7c348 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3060.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3060.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3060" title: "Compiler Error C3060" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3060" +ms.date: 11/04/2016 f1_keywords: ["C3060"] helpviewer_keywords: ["C3060"] -ms.assetid: 6282bb92-0546-4b59-9435-d3840bf93bdb --- # Compiler Error C3060 -'member' : a friend function may not be defined inside a class using a qualified name (it may only be declared) +> 'member' : a friend function may not be defined inside a class using a qualified name (it may only be declared) + +## Remarks A friend function was defined using a qualified name, which is not allowed. -The following sample generates C3060: +## Example + +The following example generates C3060: ```cpp // C3060.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3062.md b/docs/error-messages/compiler-errors-2/compiler-error-c3062.md index ecd02c0584..bb87d31e35 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3062.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3062.md @@ -1,20 +1,23 @@ --- -description: "Learn more about: Compiler Error C3062" title: "Compiler Error C3062" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3062" +ms.date: 11/04/2016 f1_keywords: ["C3062"] helpviewer_keywords: ["C3062"] -ms.assetid: 78632e6d-255f-42c3-b124-31a9194ff86d --- # Compiler Error C3062 -'enum': enumerator requires value since the underlying type is 'type' +> 'enum': enumerator requires value since the underlying type is 'type' + +## Remarks You can specify an underlying type for an enumeration. However, some types require you to assign values to each enumerator. For more information on enums, see [enum class](../../extensions/enum-class-cpp-component-extensions.md). -The following sample generates C3062: +## Example + +The following example generates C3062: ```cpp // C3062.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3063.md b/docs/error-messages/compiler-errors-2/compiler-error-c3063.md index 14672ef7f5..00e1890b69 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3063.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3063.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3063" title: "Compiler Error C3063" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3063" +ms.date: 11/04/2016 f1_keywords: ["C3063"] helpviewer_keywords: ["C3063"] -ms.assetid: 0ecf6f1f-e4a7-487a-9fd5-79d8ac470001 --- # Compiler Error C3063 -operator 'operator': all operands must have the same enumeration type +> operator 'operator': all operands must have the same enumeration type + +## Remarks When using operators on enumerators, both operands must be of the enumeration type. For more information, see [How to: Define and consume enums in C++/CLI](../../dotnet/how-to-define-and-consume-enums-in-cpp-cli.md). ## Example -The following sample generates C3063 and shows how to fix it: +The following example generates C3063 and shows how to fix it: ```cpp // C3063.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3065.md b/docs/error-messages/compiler-errors-2/compiler-error-c3065.md index 38985064a5..6c8a2fdb26 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3065.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3065.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3065" title: "Compiler Error C3065" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3065" +ms.date: 11/04/2016 f1_keywords: ["C3065"] helpviewer_keywords: ["C3065"] -ms.assetid: e7a0bc69-1c68-459e-a7c4-93c65609ff7c --- # Compiler Error C3065 -property declaration at non-class scope is not allowed +> property declaration at non-class scope is not allowed + +## Remarks The [property](../../cpp/property-cpp.md) __declspec modifier was used outside a class. A property can only be declared inside a class. -The following sample generates C3065: +## Example + +The following example generates C3065: ```cpp // C3065.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3066.md b/docs/error-messages/compiler-errors-2/compiler-error-c3066.md index 59508836a8..abba7aee35 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3066.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3066.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3066" title: "Compiler Error C3066" -ms.date: "03/28/2017" +description: "Learn more about: Compiler Error C3066" +ms.date: 03/28/2017 f1_keywords: ["C3066"] helpviewer_keywords: ["C3066"] -ms.assetid: 226f6de5-c4c5-41e2-b31a-2e30a37fbbeb --- # Compiler Error C3066 -there are multiple ways that an object of this type can be called with these arguments +> there are multiple ways that an object of this type can be called with these arguments + +## Remarks The compiler detected an ambiguous function call involving surrogates. -The following sample generates C3066: +## Examples + +The following example generates C3066: ```cpp // C3066.cpp @@ -46,7 +49,7 @@ int main() { } ``` -## Copy-list-initialization +### Copy-list-initialization In Visual Studio 2015, the compiler erroneously treated copy-list-initialization in the same way as regular copy-initialization; it considered only converting constructors for overload resolution. In the following example, Visual Studio 2015 chooses MyInt(23) but Visual Studio 2017 correctly raises the error. diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3068.md b/docs/error-messages/compiler-errors-2/compiler-error-c3068.md index 22e5e30c36..70488a7096 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3068.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3068.md @@ -7,7 +7,9 @@ helpviewer_keywords: ["C3068"] --- # Compiler Error C3068 -'function' : a 'naked' function cannot contain objects that would require unwinding if a C++ exception occurred +> 'function' : a 'naked' function cannot contain objects that would require unwinding if a C++ exception occurred + +## Remarks The compiler was unable to perform stack unwinding on a [naked](../../cpp/naked-cpp.md) function that threw an exception because a temporary object was created in the function and C++ exception handling ([/EHsc](../../build/reference/eh-exception-handling-model.md)) was specified. @@ -25,7 +27,7 @@ When an exception is thrown, compiler generated code, called the prolog and epil ## Example -The following sample generates C3068: +The following example generates C3068: ```cpp // C3068.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3069.md b/docs/error-messages/compiler-errors-2/compiler-error-c3069.md index 34a45c96c9..e334e11aaa 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3069.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3069.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3069" title: "Compiler Error C3069" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3069" +ms.date: 11/04/2016 f1_keywords: ["C3069"] helpviewer_keywords: ["C3069"] -ms.assetid: ca94291b-2bb4-4e3f-9acf-534234b83513 --- # Compiler Error C3069 -'operator': not allowed for enumeration type +> 'operator': not allowed for enumeration type + +## Remarks An operator is not supported for CLR enumerations. For more information, see [How to: Define and consume enums in C++/CLI](../../dotnet/how-to-define-and-consume-enums-in-cpp-cli.md). ## Example -The following sample generates C3069: +The following example generates C3069: ```cpp // C3069.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3070.md b/docs/error-messages/compiler-errors-2/compiler-error-c3070.md index 9740fc45ee..3e5cd8cee5 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3070.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3070.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C3070" title: "Compiler Error C3070" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3070" +ms.date: 11/04/2016 f1_keywords: ["C3070"] helpviewer_keywords: ["C3070"] -ms.assetid: ac88584d-40a6-4176-90f3-2371c3c935f2 --- # Compiler Error C3070 -'property': property does not have a 'set' method +> 'property': property does not have a 'set' method + +## Remarks A property's set accessor method was not defined. For more information, see [property](../../extensions/property-cpp-component-extensions.md). -The following sample generates C3070: +## Example + +The following example generates C3070: ```cpp // C3070.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3071.md b/docs/error-messages/compiler-errors-2/compiler-error-c3071.md index 2b25f530af..b8f37bba23 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3071.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3071.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3071" title: "Compiler Error C3071" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3071" +ms.date: 11/04/2016 f1_keywords: ["C3071"] helpviewer_keywords: ["C3071"] -ms.assetid: 69879e66-a60e-4058-9bbd-d5c5e2d8ee37 --- # Compiler Error C3071 -operator 'operator' can only be applied to an instance of a ref class or a value-type +> operator 'operator' can only be applied to an instance of a ref class or a value-type + +## Remarks A CLR operator cannot be used on a native type. The operator can be used on a ref class or a ref struct (a value type) but not a native type such as int or an alias for a native type such as System::Int32. These types can't be boxed from C++ code in a way that refers to the native variable, so the operator cannot be used. @@ -16,7 +17,7 @@ For more information, see [Tracking Reference Operator](../../extensions/trackin ## Example -The following sample generates C3071. +The following example generates C3071. ```cpp // C3071.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3072.md b/docs/error-messages/compiler-errors-2/compiler-error-c3072.md index 3fc36b7657..c4a4aa4d69 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3072.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3072.md @@ -1,22 +1,23 @@ --- -description: "Learn more about: Compiler Error C3072" title: "Compiler Error C3072" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3072" +ms.date: 11/04/2016 f1_keywords: ["C3072"] helpviewer_keywords: ["C3072"] -ms.assetid: cdd5cb6b-c478-4698-adfa-c40188d34a18 --- # Compiler Error C3072 > operator '*operator-name*' cannot be applied to an instance of a ref class +## Remarks + use the unary *operator-name* operator to convert an instance of a ref class to a handle type A CLR type requires CLR operators, not native (or standard) operators. For more information, see [Tracking Reference Operator](../../extensions/tracking-reference-operator-cpp-component-extensions.md). ## Example -The following sample generates C3072. +The following example generates C3072. ```cpp // C3072.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3073.md b/docs/error-messages/compiler-errors-2/compiler-error-c3073.md index abfadfab32..ee969551de 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3073.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3073.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3073" title: "Compiler Error C3073" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3073" +ms.date: 11/04/2016 f1_keywords: ["C3073"] helpviewer_keywords: ["C3073"] -ms.assetid: b24b9b8b-f9fb-4c3c-a1a0-97fad2081bfc --- # Compiler Error C3073 -'type' : ref class does not have a user-defined copy constructor +> 'type' : ref class does not have a user-defined copy constructor + +## Remarks In a [/clr (Common Language Runtime Compilation)](../../build/reference/clr-common-language-runtime-compilation.md) compilation, the compiler will not generate a copy constructor for a reference type. In any **/clr** compilation, you must define your own copy constructor for a reference type if you expect an instance of the type to be copied. @@ -16,7 +17,7 @@ For more information, see [C++ Stack Semantics for Reference Types](../../dotnet ## Example -The following sample generates C3073. +The following example generates C3073. ```cpp // C3073.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3075.md b/docs/error-messages/compiler-errors-2/compiler-error-c3075.md index edb6485a4c..eddf91c56c 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3075.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3075.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3075" title: "Compiler Error C3075" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3075" +ms.date: 11/04/2016 f1_keywords: ["C3075"] helpviewer_keywords: ["C3075"] -ms.assetid: f431daa9-e0fa-48f0-a5c3-f99be96b55e3 --- # Compiler Error C3075 -'instance' : you cannot embed an instance of a reference type, 'type', in a value-type +> 'instance' : you cannot embed an instance of a reference type, 'type', in a value-type + +## Remarks A value type cannot contain an instance of a reference type. @@ -16,7 +17,7 @@ For more information, see [C++ Stack Semantics for Reference Types](../../dotnet ## Example -The following sample generates C3075. +The following example generates C3075. ```cpp // C3075.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3076.md b/docs/error-messages/compiler-errors-2/compiler-error-c3076.md index 35183fa19d..62da9d235f 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3076.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3076.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3076" title: "Compiler Error C3076" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3076" +ms.date: 11/04/2016 f1_keywords: ["C3076"] helpviewer_keywords: ["C3076"] -ms.assetid: 8a87b3e4-2c17-4b87-9622-ef0962d6a34e --- # Compiler Error C3076 -'instance' : you cannot embed an instance of a reference type, 'type', in a native type +> 'instance' : you cannot embed an instance of a reference type, 'type', in a native type + +## Remarks A native type cannot contain an instance of a CLR type. @@ -16,7 +17,7 @@ For more information, see [C++ Stack Semantics for Reference Types](../../dotnet ## Example -The following sample generates C3076. +The following example generates C3076. ```cpp // C3076.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3077.md b/docs/error-messages/compiler-errors-2/compiler-error-c3077.md index 4ceb95d997..db80911f95 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3077.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3077.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3077" title: "Compiler Error C3077" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3077" +ms.date: 11/04/2016 f1_keywords: ["C3077"] helpviewer_keywords: ["C3077"] -ms.assetid: d9f3c619-d1e2-4656-81a5-a35a9586a7d4 --- # Compiler Error C3077 -'finalizer' : a finalizer can only be a member of a reference type +> 'finalizer' : a finalizer can only be a member of a reference type + +## Remarks You cannot declare a finalizer in a native or value type. @@ -16,7 +17,7 @@ For more information, see [Destructors and finalizers in How to: Define and cons ## Example -The following sample generates C3077. +The following example generates C3077. ```cpp // C3077.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3080.md b/docs/error-messages/compiler-errors-2/compiler-error-c3080.md index 14b0241f78..88cbc6ca12 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3080.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3080.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3080" title: "Compiler Error C3080" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3080" +ms.date: 11/04/2016 f1_keywords: ["C3080"] helpviewer_keywords: ["C3080"] -ms.assetid: ff62a3f7-9b3b-44bd-b8d9-f3a8e5354560 --- # Compiler Error C3080 -'finalizer_function' : a finalizer cannot have a storage-class-specifier +> 'finalizer_function' : a finalizer cannot have a storage-class-specifier + +## Remarks For more information, see [Destructors and finalizers in How to: Define and consume classes and structs (C++/CLI)](../../dotnet/how-to-define-and-consume-classes-and-structs-cpp-cli.md#BKMK_Destructors_and_finalizers). ## Example -The following sample generates C3080. +The following example generates C3080. ```cpp // C3080.cpp