Skip to content

Commit

Permalink
Fix stored type detection
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Feb 5, 2022
1 parent e2ba01f commit 90325d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/fmt/args.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ class dynamic_format_arg_store
};

template <typename T>
using stored_type = conditional_t<detail::is_string<T>::value &&
!has_formatter<T, Context>::value &&
!detail::is_reference_wrapper<T>::value,
std::basic_string<char_type>, T>;
using stored_type = conditional_t<
std::is_convertible<T, std::basic_string<char_type>>::value &&
!detail::is_reference_wrapper<T>::value,
std::basic_string<char_type>, T>;

// Storage of basic_format_arg must be contiguous.
std::vector<basic_format_arg<Context>> data_;
Expand Down

0 comments on commit 90325d0

Please sign in to comment.