mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 15:21:54 +00:00
Use C++11-compatible operations
The `std::is_base_of<T,U>()` and `std::is_reference<T>()` member functions were added in C++14. To maintain C++11 compatibility, use the `::value` instead. Current code fails on intel-17 and other compilers if using strict C++11
This commit is contained in:
parent
ae3ea156ea
commit
55b6130055
@ -1426,8 +1426,8 @@ template <typename... Args, typename S, typename Char = char_t<S>>
|
|||||||
inline format_arg_store<buffer_context<Char>, remove_reference_t<Args>...>
|
inline format_arg_store<buffer_context<Char>, remove_reference_t<Args>...>
|
||||||
make_args_checked(const S& format_str,
|
make_args_checked(const S& format_str,
|
||||||
const remove_reference_t<Args>&... args) {
|
const remove_reference_t<Args>&... args) {
|
||||||
static_assert(all_true<(!std::is_base_of<view, remove_reference_t<Args>>() ||
|
static_assert(all_true<(!std::is_base_of<view, remove_reference_t<Args>>::value ||
|
||||||
!std::is_reference<Args>())...>::value,
|
!std::is_reference<Args>::value)...>::value,
|
||||||
"passing views as lvalues is disallowed");
|
"passing views as lvalues is disallowed");
|
||||||
check_format_string<remove_const_t<remove_reference_t<Args>>...>(format_str);
|
check_format_string<remove_const_t<remove_reference_t<Args>>...>(format_str);
|
||||||
return {args...};
|
return {args...};
|
||||||
|
Loading…
Reference in New Issue
Block a user