Skip to content

Commit ba91bf4

Browse files
Silence codecvt deprecation warning in StringUtils.cpp
1 parent c1e5f7b commit ba91bf4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

StringUtils.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@
77
| SPDX-License-Identifier: GPL-2.0-or-later |
88
\*---------------------------------------------------------*/
99

10+
/*---------------------------------------------------------*\
11+
| codecvt is deprecated, but there's no replacement so we |
12+
| can ignore the warnings |
13+
\*---------------------------------------------------------*/
14+
#if defined(_MSC_VER)
15+
#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
16+
#elif defined(__GNUC__)
17+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
18+
#elif defined(__clang__)
19+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
20+
#endif
21+
1022
#include <codecvt>
1123
#include <locale>
1224
#include <string>

0 commit comments

Comments
 (0)