Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a3ef0db

Browse filesBrowse files
committed
-Wself-move was added in GCC 13
1 parent 791e72b commit a3ef0db
Copy full SHA for a3ef0db

File tree

1 file changed

+6
-2
lines changed
Filter options

1 file changed

+6
-2
lines changed

‎test/src/String/test_move.cpp

Copy file name to clipboardExpand all lines: test/src/String/test_move.cpp
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,14 @@ TEST_CASE("Testing String move assignment", "[String-move-02]")
3131

3232
TEST_CASE("Testing String move self assignment", "[String-move-03]")
3333
{
34-
arduino::String a("src");
34+
#if defined(GCC_VERSION) && GCC_VERSION >= 13
3535
#pragma GCC diagnostic push
3636
#pragma GCC diagnostic ignored "-Wself-move"
37+
#endif
38+
arduino::String a("src");
3739
a = std::move(a);
38-
#pragma GCC diagnostic pop
3940
REQUIRE(a == "src");
41+
#if defined(GCC_VERSION) && GCC_VERSION >= 13
42+
#pragma GCC diagnostic pop
43+
#endif
4044
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.