Skip to content

Commit 318a421

Browse files
authored
Merge pull request #5495 from MicrosoftDocs/FromPublicMasterBranch
Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main)
2 parents 566bcf4 + 814f892 commit 318a421

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
description: "Learn more about: Compiler Error C2751"
33
title: "Compiler Error C2751"
4-
ms.date: "11/04/2016"
4+
ms.date: "03/11/2024"
55
f1_keywords: ["C2751"]
66
helpviewer_keywords: ["C2751"]
7-
ms.assetid: 44a3abdf-8a87-4a09-b34b-532c220c310a
87
---
98
# Compiler Error C2751
109

@@ -16,11 +15,11 @@ The following sample generates C2751:
1615

1716
```cpp
1817
// C2751.cpp
19-
namespace std {
20-
template<typename T>
21-
class list {};
18+
// compile with: /c
19+
namespace NS
20+
{
21+
class C {};
2222
}
2323

24-
#define list std::list
25-
void f(int &list){} // C2751
24+
void func(int NS::C) {} // C2751
2625
```

0 commit comments

Comments
 (0)