mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-02 15:11:43 +01:00
Fix #2816: strip named argument wrappers for compile-time checking
This commit is contained in:
committed by
Victor Zverovich
parent
c076a54a4d
commit
3d19be282a
@@ -1816,6 +1816,7 @@ TEST(format_test, compile_time_string) {
|
||||
"foo"_a = "foo"));
|
||||
EXPECT_EQ("", fmt::format(FMT_STRING("")));
|
||||
EXPECT_EQ("", fmt::format(FMT_STRING(""), "arg"_a = 42));
|
||||
EXPECT_EQ("42", fmt::format(FMT_STRING("{answer}"), "answer"_a = Answer()));
|
||||
#endif
|
||||
|
||||
(void)static_with_null;
|
||||
@@ -1885,6 +1886,8 @@ TEST(format_test, named_arg_udl) {
|
||||
fmt::format("{first}{second}{first}{third}", fmt::arg("first", "abra"),
|
||||
fmt::arg("second", "cad"), fmt::arg("third", 99)),
|
||||
udl_a);
|
||||
|
||||
EXPECT_EQ("42", fmt::format("{answer}", "answer"_a = Answer()));
|
||||
}
|
||||
#endif // FMT_USE_USER_DEFINED_LITERALS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user