Skip to content

Commit 39c5502

Browse files
authored
Merge pull request #5422 from Rageking8/add-missing-square-brackets-for-nodiscard-in-c4834-reference
Add missing square brackets for `[[nodiscard]]` in C4834 reference
2 parents c48346f + 96ec681 commit 39c5502

File tree

1 file changed

+2
-2
lines changed
  • docs/error-messages/compiler-warnings

1 file changed

+2
-2
lines changed

docs/error-messages/compiler-warnings/c4834.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
description: "Learn about the cause and fixes for Compiler warning (level 1) C4834."
32
title: "Compiler warning (Level 1) C4834"
3+
description: "Learn about the cause and fixes for Compiler warning (level 1) C4834."
44
ms.date: 01/18/2024
55
f1_keywords: ["C4834"]
66
helpviewer_keywords: ["C4834"]
@@ -43,7 +43,7 @@ int square_of(int i) { return i * i; }
4343
int main()
4444
{
4545
square_of(42); // warning C4834: discarding return value of function with 'nodiscard' attribute
46-
// If ignoring the [[nodiscard] attribute is unintentional, make use of the return value as intended:
46+
// If ignoring the [[nodiscard]] attribute is unintentional, make use of the return value as intended:
4747
// For example:
4848
std::cout << "square_of(42) = " << square_of(42) << "\n"; // Ok
4949
// Or:

0 commit comments

Comments
 (0)