-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an STL-wide suppression for C5246 (#4527)
Co-authored-by: Stephan T. Lavavej <[email protected]>
- Loading branch information
1 parent
983b26d
commit 80387d3
Showing
4 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
RUNALL_INCLUDE ..\usual_latest_matrix.lst | ||
RUNALL_CROSSLIST | ||
* PM_CL="/w15246" |
15 changes: 15 additions & 0 deletions
15
tests/std/tests/GH_004477_mdspan_warning_5246/test.compile.pass.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
#include <array> | ||
#include <cstddef> | ||
#include <mdspan> | ||
|
||
using namespace std; | ||
|
||
// Test GH-4477 "Using std::mdspan results in multiple warnings (C5246)" | ||
void test_gh_4477() { | ||
array test_data{0, 1, 2, 3, 4, 5}; | ||
mdspan<int, dextents<size_t, 2>> test_span(test_data.data(), 2, 3); | ||
(void) test_span; | ||
} |