diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3421.md b/docs/error-messages/compiler-errors-2/compiler-error-c3421.md index f80f790e6b..d3c41e7bda 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3421.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3421.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3421" title: "Compiler Error C3421" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3421" +ms.date: 11/04/2016 f1_keywords: ["C3421"] helpviewer_keywords: ["C3421"] -ms.assetid: b52050c6-17a4-424a-8894-337b0cec7010 --- # Compiler Error C3421 -'type' : you cannot call the finalizer for this class as it is either inaccessible or it does not exist +> 'type' : you cannot call the finalizer for this class as it is either inaccessible or it does not exist + +## Remarks A finalizer is implicitly private, so it cannot be called from outside its enclosing type. @@ -16,7 +17,7 @@ For more information, see [Destructors and finalizers in How to: Define and cons ## Example -The following sample generates C3421. +The following example generates C3421. ```cpp // C3421.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3445.md b/docs/error-messages/compiler-errors-2/compiler-error-c3445.md index 3fc2bcb631..7add75b031 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3445.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3445.md @@ -1,22 +1,23 @@ --- -description: "Learn more about: Compiler Error C3445" title: "Compiler Error C3445" -ms.date: "04/10/2017" +description: "Learn more about: Compiler Error C3445" +ms.date: 04/10/2017 f1_keywords: ["C3445"] helpviewer_keywords: ["C3445"] -ms.assetid: 0d272bfc-136b-4025-a9ba-5e4eea5f8215 --- # Compiler Error C3445 > copy-list-initialization of '*type*' cannot use an explicit constructor +## Remarks + According to the ISO C++17 standard, the compiler is required to consider an explicit constructor for overload resolution in copy-list-initialization, but must raise an error if that overload is actually chosen. Starting in Visual Studio 2017, the compiler finds errors related to object creation by using an initializer list that were not found by Visual Studio 2015. These errors could lead to crashes or undefined behavior at runtime. ## Example -The following sample generates C3445. +The following example generates C3445. ```cpp // C3445.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3446.md b/docs/error-messages/compiler-errors-2/compiler-error-c3446.md index 0a6ae8b11e..46fe4603c2 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3446.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3446.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3446" title: "Compiler Error C3446" -ms.date: "07/21/2017" +description: "Learn more about: Compiler Error C3446" +ms.date: 07/21/2017 f1_keywords: ["C3446"] helpviewer_keywords: ["C3446"] -ms.assetid: 33064548-24e4-46f1-beb1-476e3c3b3fbf --- # Compiler Error C3446 ->'*class*': a default member initializer is not allowed for a member of a value class +> '*class*': a default member initializer is not allowed for a member of a value class + +## Remarks 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: ## Example -The following sample generates C3446 in Visual Studio 2017 and later: +The following example generates C3446 in Visual Studio 2017 and later: ```cpp // C3446.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3450.md b/docs/error-messages/compiler-errors-2/compiler-error-c3450.md index ffdbc286a2..1b8c1d6bf6 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3450.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3450.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3450" title: "Compiler Error C3450" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3450" +ms.date: 11/04/2016 f1_keywords: ["C3450"] helpviewer_keywords: ["C3450"] -ms.assetid: 78892cf7-0b82-4589-90d0-e06666247003 --- # Compiler Error C3450 -'type': not an attribute; cannot specify [System::AttributeUsageAttribute] or [Windows::Foundation::Metadata::AttributeUsageAttribute] +> 'type': not an attribute; cannot specify [System::AttributeUsageAttribute] or [Windows::Foundation::Metadata::AttributeUsageAttribute] + +## Remarks A user-defined managed attribute must inherit from . A Windows Runtime attribute must be defined in the `Windows::Foundation::Metadata` namespace. @@ -16,7 +17,7 @@ For more information, see [User-Defined Attributes](../../extensions/user-define ## Example -The following sample generates C3450 and shows how to fix it. +The following example generates C3450 and shows how to fix it. ```cpp // C3450.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3451.md b/docs/error-messages/compiler-errors-2/compiler-error-c3451.md index 6e7e9dbe75..17b42bf6a5 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3451.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3451.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3451" title: "Compiler Error C3451" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3451" +ms.date: 11/04/2016 f1_keywords: ["C3451"] helpviewer_keywords: ["C3451"] -ms.assetid: a4897a69-e3e7-40bb-bb1c-598644904012 --- # Compiler Error C3451 -'attribute': cannot apply unmanaged attribute to 'type' +> 'attribute': cannot apply unmanaged attribute to 'type' + +## Remarks A C++ attribute cannot be applied to a CLR type. See [C++ Attributes Reference](../../windows/attributes/attributes-alphabetical-reference.md) for more information. @@ -18,7 +19,7 @@ This error can be generated as a result of compiler conformance work that was do ## Example -The following sample generates C3451. +The following example generates C3451. ```cpp // C3451.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3452.md b/docs/error-messages/compiler-errors-2/compiler-error-c3452.md index b40ab656fc..4a112bc393 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3452.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3452.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3452" title: "Compiler Error C3452" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3452" +ms.date: 11/04/2016 f1_keywords: ["C3452"] helpviewer_keywords: ["C3452"] -ms.assetid: e5293dcf-cb70-4133-ae2a-0bb496950ba0 --- # Compiler Error C3452 -list argument member not constant +> list argument member not constant + +## Remarks An argument was passed to an attribute that expected a constant, a value that can be evaluated at compile time. ## Example -The following sample generates C3452. +The following example generates C3452. ```cpp // C3452.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3453.md b/docs/error-messages/compiler-errors-2/compiler-error-c3453.md index edd640d730..d04287ade5 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3453.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3453.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3453" title: "Compiler Error C3453" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3453" +ms.date: 11/04/2016 f1_keywords: ["C3453"] helpviewer_keywords: ["C3453"] -ms.assetid: dbefdbcf-f697-4239-b7a5-1d99b85e9e7f --- # Compiler Error C3453 -'attribute': attribute not applied because qualifier 'assembly' did not match +> 'attribute': attribute not applied because qualifier 'assembly' did not match + +## Remarks Assembly or module level attributes can only be specified as stand-alone instructions. ## Example -The following sample generates C3453. +The following example generates C3453. ```cpp // C3453.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3454.md b/docs/error-messages/compiler-errors-2/compiler-error-c3454.md index f051c32753..c7034d1663 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3454.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3454.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3454" title: "Compiler Error C3454" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3454" +ms.date: 11/04/2016 f1_keywords: ["C3454"] helpviewer_keywords: ["C3454"] -ms.assetid: dc4e6d57-5b4d-4114-8d6f-22f9ae62925b --- # Compiler Error C3454 -[attribute] not allowed on class declaration +> [attribute] not allowed on class declaration + +## Remarks A class must be defined for it to be an attribute. @@ -16,7 +17,7 @@ For more information, see [attribute](../../windows/attributes/attribute.md). ## Example -The following sample generates C3454. +The following example generates C3454. ```cpp // C3454.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3455.md b/docs/error-messages/compiler-errors-2/compiler-error-c3455.md index f32ad44b44..5cdd85744c 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3455.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3455.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3455" title: "Compiler Error C3455" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3455" +ms.date: 11/04/2016 f1_keywords: ["C3455"] helpviewer_keywords: ["C3455"] -ms.assetid: 218e5cfe-5391-4eeb-81c2-85c47e3a6cd2 --- # Compiler Error C3455 -'attribute': none of the attribute constructors matched the arguments +> 'attribute': none of the attribute constructors matched the arguments + +## Remarks An invalid value was used to declare an attribute. See [attribute](../../windows/attributes/attribute.md) for more information. ## Example -The following sample generates C3455. +The following example generates C3455. ```cpp // C3455.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3456.md b/docs/error-messages/compiler-errors-2/compiler-error-c3456.md index 73d326827f..996bf27c05 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3456.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3456.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3456" title: "Compiler Error C3456" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3456" +ms.date: 11/04/2016 f1_keywords: ["C3456"] helpviewer_keywords: ["C3456"] -ms.assetid: 9f781919-aaf2-4725-94a4-44a0b80cc64a --- # Compiler Error C3456 -[source_annotation_attribute] not allowed on managed or WinRT class declaration +> [source_annotation_attribute] not allowed on managed or WinRT class declaration + +## Remarks source_annotation_attribute is used to define custom attributes to be used by code analysis. diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3457.md b/docs/error-messages/compiler-errors-2/compiler-error-c3457.md index 4b97bea6db..dc7ffe0c88 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3457.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3457.md @@ -7,13 +7,15 @@ helpviewer_keywords: ["C3457"] --- # Compiler Error C3457 -'attribute': attribute does not support unnamed arguments +> 'attribute': attribute does not support unnamed arguments + +## Remarks Source annotation attributes, unlike CLR custom attribute or compiler attributes, only support named arguments. ## Example -The following sample generates C3457. +The following example generates C3457. ```cpp #include "SourceAnnotations.h" diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3458.md b/docs/error-messages/compiler-errors-2/compiler-error-c3458.md index 345783c0e1..a6d8238079 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3458.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3458.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3458" title: "Compiler Error C3458" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3458" +ms.date: 11/04/2016 f1_keywords: ["C3458"] helpviewer_keywords: ["C3458"] -ms.assetid: 940202fd-8dcc-4042-9c96-3f9e9127d2f1 --- # Compiler Error C3458 -'attribute1': attribute 'attribute2' already specified for 'construct' +> 'attribute1': attribute 'attribute2' already specified for 'construct' + +## Remarks Two attributes that are mutually exclusive were specified for the same construct. ## Example -The following sample generates C3458 +The following example generates C3458 ```cpp // C3458.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3459.md b/docs/error-messages/compiler-errors-2/compiler-error-c3459.md index 98298a38e2..4c8ad60d6f 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3459.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3459.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3459" title: "Compiler Error C3459" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3459" +ms.date: 11/04/2016 f1_keywords: ["C3459"] helpviewer_keywords: ["C3459"] -ms.assetid: 3d290a20-d313-4c07-9bd8-c5c159cb169f --- # Compiler Error C3459 -'attribute': attribute allowed only on class indexer (default indexed property) +> 'attribute': attribute allowed only on class indexer (default indexed property) + +## Remarks An attribute that is designed to be applied to a class indexer property was used incorrectly. @@ -16,7 +17,7 @@ For more information, see [How to: Use Properties in C++/CLI](../../dotnet/how-t ## Example -The following sample generates C3459. +The following example generates C3459. ```cpp // C3459.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3460.md b/docs/error-messages/compiler-errors-2/compiler-error-c3460.md index 58c67af4f7..e002f487f9 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3460.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3460.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3460" title: "Compiler Error C3460" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3460" +ms.date: 11/04/2016 f1_keywords: ["C3460"] helpviewer_keywords: ["C3460"] -ms.assetid: adbf8775-10ca-4654-acdf-58dd765351cd --- # Compiler Error C3460 -'type': only a user-defined type can be forwarded +> 'type': only a user-defined type can be forwarded + +## Remarks For more information, see [Type Forwarding (C++/CLI)](../../extensions/type-forwarding-cpp-cli.md). -## Examples +## Example -The following sample creates a component. +The following example creates a component. ```cpp // C3460.cpp @@ -22,7 +23,7 @@ The following sample creates a component. public ref class R {}; ``` -The following sample generates C3460. +The following example generates C3460. ```cpp // C3460_b.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3461.md b/docs/error-messages/compiler-errors-2/compiler-error-c3461.md index 4c45c0a6ea..9c801ba167 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3461.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3461.md @@ -1,22 +1,23 @@ --- -description: "Learn more about: Compiler Error C3461" title: "Compiler Error C3461" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3461" +ms.date: 11/04/2016 f1_keywords: ["C3461"] helpviewer_keywords: ["C3461"] -ms.assetid: bd66833a-545d-445a-bdfe-dee771a450a4 --- # Compiler Error C3461 -'type': only a managed type can be forwarded +> 'type': only a managed type can be forwarded + +## Remarks Type forwarding can only occur on CLR types. See [Classes and Structs](../../extensions/classes-and-structs-cpp-component-extensions.md) for more information. For more information, see [Type Forwarding (C++/CLI)](../../extensions/type-forwarding-cpp-cli.md). -## Examples +## Example -The following sample creates a component. +The following example creates a component. ```cpp // C3461.cpp @@ -24,7 +25,7 @@ The following sample creates a component. public ref class R {}; ``` -The following sample generates C3461. +The following example generates C3461. ```cpp // C3461b.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3462.md b/docs/error-messages/compiler-errors-2/compiler-error-c3462.md index 1711df90e8..1c48adb2f4 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3462.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3462.md @@ -1,22 +1,23 @@ --- -description: "Learn more about: Compiler Error C3462" title: "Compiler Error C3462" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3462" +ms.date: 11/04/2016 f1_keywords: ["C3462"] helpviewer_keywords: ["C3462"] -ms.assetid: 56b75f35-9fad-42d9-a969-eeca5d709bec --- # Compiler Error C3462 -'type': only an imported type can be forwarded +> 'type': only an imported type can be forwarded + +## Remarks The TypeForwardedTo attribute must be applied to a type in referenced metadata. For more information, see [Type Forwarding (C++/CLI)](../../extensions/type-forwarding-cpp-cli.md). -## Examples +## Example -The following sample creates a component. +The following example creates a component. ```cpp // C3462.cpp @@ -24,7 +25,7 @@ The following sample creates a component. public ref class R {}; ``` -The following sample generates C3462. +The following example generates C3462. ```cpp // C3462b.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3463.md b/docs/error-messages/compiler-errors-2/compiler-error-c3463.md index 96fbcf90c5..e2b9d5fff2 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3463.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3463.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3463" title: "Compiler Error C3463" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3463" +ms.date: 11/04/2016 f1_keywords: ["C3463"] helpviewer_keywords: ["C3463"] -ms.assetid: 153efcc0-085c-4615-84ea-d22942618bdf --- # Compiler Error C3463 -'type': type not allowed in attribute 'implements' +> 'type': type not allowed in attribute 'implements' + +## Remarks An invalid type was passed to the [implements](../../windows/attributes/implements-cpp.md) attribute. For example, you can pass an interface to `implements`, but you cannot pass a pointer to an interface. ## Example -The following sample generates C3463. +The following example generates C3463. ```cpp // C3463.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3464.md b/docs/error-messages/compiler-errors-2/compiler-error-c3464.md index 4def91d259..684c143ea6 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3464.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3464.md @@ -1,22 +1,23 @@ --- -description: "Learn more about: Compiler Error C3464" title: "Compiler Error C3464" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3464" +ms.date: 11/04/2016 f1_keywords: ["C3464"] helpviewer_keywords: ["C3464"] -ms.assetid: 0ede05dc-4486-4921-8e8c-78ab5a2e09c5 --- # Compiler Error C3464 -'type' a nested type cannot be forwarded +> 'type' a nested type cannot be forwarded + +## Remarks Type forwarding does not work on nested types. For more information, see [Type Forwarding (C++/CLI)](../../extensions/type-forwarding-cpp-cli.md). -## Examples +## Example -The following sample creates a component. +The following example creates a component. ```cpp // C3464.cpp @@ -27,7 +28,7 @@ public: }; ``` -The following sample generates C3464. +The following example generates C3464. ```cpp // C3464_b.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3465.md b/docs/error-messages/compiler-errors-2/compiler-error-c3465.md index 453ced5d66..b49fc9e1f2 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3465.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3465.md @@ -1,22 +1,23 @@ --- -description: "Learn more about: Compiler Error C3465" title: "Compiler Error C3465" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3465" +ms.date: 11/04/2016 f1_keywords: ["C3465"] helpviewer_keywords: ["C3465"] -ms.assetid: aeb815e5-b3fc-4525-afe2-d738e9321df1 --- # Compiler Error C3465 -to use type 'type' you must reference the assembly 'assembly' +> to use type 'type' you must reference the assembly 'assembly' + +## Remarks Type forwarding will work for a client application until you recompile the client. When you recompile, you will need a reference for every assembly containing the definition of a type used in your client application. For more information, see [Type Forwarding (C++/CLI)](../../extensions/type-forwarding-cpp-cli.md). -## Examples +## Example -The following sample builds an assembly that contains the new location of a type. +The following example builds an assembly that contains the new location of a type. ```cpp // C3465.cpp @@ -27,7 +28,7 @@ public: }; ``` -The following sample builds an assembly that used to contain the definition of the type, but now contains forwarding syntax for the type. +The following example builds an assembly that used to contain the definition of the type, but now contains forwarding syntax for the type. ```cpp // C3465_b.cpp @@ -36,7 +37,7 @@ The following sample builds an assembly that used to contain the definition of t [ assembly:TypeForwardedTo(R::typeid) ]; ``` -The following sample generates C3465. +The following example generates C3465. ```cpp // C3465_c.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3466.md b/docs/error-messages/compiler-errors-2/compiler-error-c3466.md index 2f1b223aa9..9183287145 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3466.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3466.md @@ -1,22 +1,23 @@ --- -description: "Learn more about: Compiler Error C3466" title: "Compiler Error C3466" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3466" +ms.date: 11/04/2016 f1_keywords: ["C3466"] helpviewer_keywords: ["C3466"] -ms.assetid: 69a877d9-a749-474b-bfc3-8d3fd53ba8fd --- # Compiler Error C3466 -'type' : a specialization of a generic class cannot be forwarded +> 'type' : a specialization of a generic class cannot be forwarded + +## Remarks You cannot use type forwarding on a specialization of a generic class. For more information, see [Type Forwarding (C++/CLI)](../../extensions/type-forwarding-cpp-cli.md). -## Examples +## Example -The following sample creates a component. +The following example creates a component. ```cpp // C3466.cpp @@ -27,7 +28,7 @@ public ref class GR {}; public ref class GR2 {}; ``` -The following sample generates C3466. +The following example generates C3466. ```cpp // C3466_b.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3467.md b/docs/error-messages/compiler-errors-2/compiler-error-c3467.md index 05af0ad696..4b253247f2 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3467.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3467.md @@ -1,22 +1,23 @@ --- -description: "Learn more about: Compiler Error C3467" title: "Compiler Error C3467" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3467" +ms.date: 11/04/2016 f1_keywords: ["C3467"] helpviewer_keywords: ["C3467"] -ms.assetid: e2b844d0-4920-412f-99fd-cd8051c4aa41 --- # Compiler Error C3467 -'type' : this type has already been forwarded +> 'type' : this type has already been forwarded + +## Remarks The compiler found more than one forward type declaration for the same type. Only one declaration per type is allowed. For more information, see [Type Forwarding (C++/CLI)](../../extensions/type-forwarding-cpp-cli.md). -## Examples +## Example -The following sample creates a component. +The following example creates a component. ```cpp // C3467.cpp @@ -24,7 +25,7 @@ The following sample creates a component. public ref class R {}; ``` -The following sample generates C3467. +The following example generates C3467. ```cpp // C3467_b.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3468.md b/docs/error-messages/compiler-errors-2/compiler-error-c3468.md index 62e82fd913..e101a28857 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3468.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3468.md @@ -1,24 +1,23 @@ --- -description: "Learn more about: Compiler Error C3468" title: "Compiler Error C3468" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3468" +ms.date: 11/04/2016 f1_keywords: ["C3468"] helpviewer_keywords: ["C3468"] -ms.assetid: cfd320db-2f6e-4e0d-ba02-e79ece87e1e0 --- # Compiler Error C3468 -'type' : you can only forward a type to an assembly: +> '*type*': you can only forward a type to an assembly: '*identifier*' is not an assembly -'`file`' is not an assembly +## Remarks Only types in an assembly can be forwarded. For more information, see [Type Forwarding (C++/CLI)](../../extensions/type-forwarding-cpp-cli.md). -## Examples +## Example -The following sample creates a module. +The following example creates a module. ```cpp // C3468.cpp @@ -26,7 +25,7 @@ The following sample creates a module. public ref class R {}; ``` -The following sample generates C3468. +The following example generates C3468. ```cpp // C3468_b.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3469.md b/docs/error-messages/compiler-errors-2/compiler-error-c3469.md index e45fb32a38..3977e7f2c5 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3469.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3469.md @@ -1,22 +1,23 @@ --- -description: "Learn more about: Compiler Error C3469" title: "Compiler Error C3469" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3469" +ms.date: 11/04/2016 f1_keywords: ["C3469"] helpviewer_keywords: ["C3469"] -ms.assetid: e23b0e5c-c704-4e67-a868-bf02c2055d85 --- # Compiler Error C3469 -'type' : a generic class cannot be forwarded +> 'type' : a generic class cannot be forwarded + +## Remarks You cannot use type forwarding on a generic class. For more information, see [Type Forwarding (C++/CLI)](../../extensions/type-forwarding-cpp-cli.md). -## Examples +## Example -The following sample creates a component. +The following example creates a component. ```cpp // C3469.cpp @@ -27,7 +28,7 @@ public ref class GR {}; public ref class GR2 {}; ``` -The following sample generates C3466. +The following example generates C3466. ```cpp // C3469_b.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3470.md b/docs/error-messages/compiler-errors-2/compiler-error-c3470.md index a487c4e889..ebbbfbe209 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3470.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3470.md @@ -1,20 +1,21 @@ --- -description: "Learn more about: Compiler Error C3470" title: "Compiler Error C3470" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3470" +ms.date: 11/04/2016 f1_keywords: ["C3470"] helpviewer_keywords: ["C3470"] -ms.assetid: 170c7a9d-214d-41b1-8f15-d4a4fc38aaa5 --- # Compiler Error C3470 -'type' : a class cannot have both an indexer (default indexed property) and an operator[] +> 'type' : a class cannot have both an indexer (default indexed property) and an operator[] + +## Remarks A type cannot define both a default indexer and an operator[]. ## Example -The following sample generates C3470 +The following example generates C3470 ```cpp // C3470.cpp diff --git a/docs/error-messages/compiler-errors-2/compiler-error-c3480.md b/docs/error-messages/compiler-errors-2/compiler-error-c3480.md index 261faca8ab..a032ea4e1b 100644 --- a/docs/error-messages/compiler-errors-2/compiler-error-c3480.md +++ b/docs/error-messages/compiler-errors-2/compiler-error-c3480.md @@ -1,14 +1,15 @@ --- -description: "Learn more about: Compiler Error C3480" title: "Compiler Error C3480" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C3480" +ms.date: 11/04/2016 f1_keywords: ["C3480"] helpviewer_keywords: ["C3480"] -ms.assetid: 7b2e055a-9604-4d13-861b-b38bda1a6940 --- # Compiler Error C3480 -'var': a lambda capture variable must be from an enclosing function scope +> 'var': a lambda capture variable must be from an enclosing function scope + +## Remarks The lambda capture variable is not from an enclosing function scope. @@ -16,7 +17,7 @@ The lambda capture variable is not from an enclosing function scope. - Remove the variable from the capture list of the lambda expression. -## Examples +## Example The following example generates C3480 because the variable `global` is not from an enclosing function scope: