Skip to content

Commit 39dda50

Browse files
authored
Merge pull request #5792 from MicrosoftDocs/main
2/19/2025 AM Publish
2 parents 529d630 + 9dbeffc commit 39dda50

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

docs/build/reference/zc-lambda.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ The **`/Zc:lambda`** compiler option enables conforming lambda grammar and proce
1717

1818
The **`/Zc:lambda`** compiler option enables the conforming lambda processor. It parses and implements lambda code according to the C++ standard. This option is off by default, which uses the legacy lambda processor. Use this option to enable conformance-mode syntax checks of generic lambdas when you use the default [`/std:c++14`](std-specify-language-standard-version.md) or the [`/std:c++17`](std-specify-language-standard-version.md) compiler options.
1919

20-
**`/Zc:lambda`** is automatically enabled by the [`/std:c++20`](std-specify-language-standard-version.md), [`/std:c++latest`]
21-
(std-specify-language-standard-version.md), [`/permissive-`](permissive-standards-conformance.md), and [`/experimental:module`](experimental-module.md) options. You can disable it explicitly by using **`/Zc:lambda-`**.
20+
**`/Zc:lambda`** is automatically enabled by the [`/std:c++20`](std-specify-language-standard-version.md), [`/std:c++latest`](std-specify-language-standard-version.md), [`/permissive-`](permissive-standards-conformance.md), and [`/experimental:module`](experimental-module.md) options. You can disable it explicitly by using **`/Zc:lambda-`**.
2221

2322
The **`/Zc:lambda`** option is available starting in Visual Studio 2019 version 16.8. It's available as **`/experimental:newLambdaProcessor`** starting in Visual Studio 2019 version 16.3, but this spelling is now deprecated.
2423

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C2200"
32
title: "Compiler Error C2200"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C2200"
4+
ms.date: "02/15/2025"
55
f1_keywords: ["C2200"]
66
helpviewer_keywords: ["C2200"]
7-
ms.assetid: a04139a6-ce18-404b-9bfd-2369fc0af3cb
87
---
98
# Compiler Error C2200
109

11-
'function' : function has already been defined
10+
'function': function has already been defined
11+
12+
An [`alloc_text`](../../preprocessor/alloc-text.md) pragma uses a function name already defined. Ensure the `alloc_text` pragma appears after the function declaration but before its definition.
13+
14+
The following sample generates C2200:
1215

13-
An `alloc_text` pragma uses a function name already defined.
16+
```cpp
17+
// C2200.cpp
18+
// compile with: /c
19+
extern "C" void func() {}
20+
#pragma alloc_text("section", func) // C2200
21+
```

0 commit comments

Comments
 (0)