(void)X; suppresses -Wunused-variable

This commit is contained in:
denchat 2019-05-11 23:38:02 +07:00 committed by GitHub
parent 889f904aa5
commit 8b3227f97d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2540,9 +2540,11 @@ TEST(FormatTest, EmphasisNonHeaderOnly) {
TEST(FormatTest, CharTraitsIsNotAmbiguous) {
// Test that we don't inject internal names into the std namespace.
using namespace std;
FMT_MAYBE_UNUSED char_traits<char>::char_type c;
char_traits<char>::char_type c;
(void)c;
#if __cplusplus >= 201103L
std::string s;
FMT_MAYBE_UNUSED auto lval = begin(s);
auto lval = begin(s);
(void)lval;
#endif
}