Fix compile checks for mixing narrow and wide strings (#690)

This commit is contained in:
Victor Zverovich
2018-03-30 09:29:47 -10:00
parent c5ebecf7c6
commit e8e006f4e7
2 changed files with 7 additions and 2 deletions

View File

@@ -619,8 +619,8 @@ FMT_MAKE_VALUE(pointer_type, std::nullptr_t, const void*)
// pointer cast it to "void *" or "const void *". In particular, this forbids
// formatting of "[const] volatile char *" which is printed as bool by
// iostreams.
template <typename T>
void make_value(const T *) {
template <typename C, typename T>
typed_value<C, pointer_type> make_value(const T *) {
static_assert(!sizeof(T), "formatting of non-void pointers is disallowed");
}