Disallow formatting of wide strings when using a narrow string formatter.

This commit is contained in:
Victor Zverovich
2014-07-04 06:56:19 -07:00
parent 270ed1cb92
commit 144e1fbb7c
2 changed files with 8 additions and 2 deletions

View File

@@ -35,6 +35,7 @@ expect_compile_error("const volatile char s[] = \"test\"; (fmt::internal::MakeAr
# MakeArg<char> doesn't accept wchar_t.
expect_compile_error("fmt::internal::MakeArg<char>(L'a');")
expect_compile_error("fmt::internal::MakeArg<char>(L\"test\");")
# Writing a wide character to a character stream Writer is forbidden.
expect_compile_error("fmt::Writer() << L'a';")