Simplify is_variant_like_ check, fix compile error before GCC 11 (#3072)

Co-authored-by: Vladislav Shchapov <vladislav@shchapov.ru>

Co-authored-by: Vladislav Shchapov <vladislav@shchapov.ru>
This commit is contained in:
NewbieOrange
2022-09-03 12:08:07 +08:00
committed by GitHub
parent fec5515c55
commit 29c6000137
2 changed files with 7 additions and 6 deletions

View File

@ -75,6 +75,9 @@ TEST(std_test, variant) {
EXPECT_EQ(fmt::format("{}", v4), "variant(monostate)");
EXPECT_EQ(fmt::format("{}", v5), "variant(\"yes, this is variant\")");
volatile int i = 42; // Test compile error before GCC 11 described in #3068.
EXPECT_EQ(fmt::format("{}", i), "42");
#endif
}