Use [[maybe_unused]] to suppress -Wunused-variable

This commit is contained in:
denchat 2019-05-10 17:39:05 +07:00 committed by GitHub
parent 9155a22af6
commit eaaa44c3ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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