mirror of
https://github.com/fmtlib/fmt.git
synced 2026-05-05 12:04:11 +02:00
Remove const qualification in compile-time checks
This commit is contained in:
committed by
Victor Zverovich
parent
da2d33f1f1
commit
699fe8e711
+3
-1
@@ -198,6 +198,8 @@ using conditional_t = typename std::conditional<B, T, F>::type;
|
||||
template <bool B> using bool_constant = std::integral_constant<bool, B>;
|
||||
template <typename T>
|
||||
using remove_reference_t = typename std::remove_reference<T>::type;
|
||||
template <typename T>
|
||||
using remove_const_t = typename std::remove_const<T>::type;
|
||||
|
||||
struct monostate {};
|
||||
|
||||
@@ -1273,7 +1275,7 @@ make_args_checked(const S& format_str,
|
||||
static_assert(all_true<(!std::is_base_of<view, remove_reference_t<Args>>() ||
|
||||
!std::is_reference<Args>())...>::value,
|
||||
"passing views as lvalues is disallowed");
|
||||
check_format_string<remove_reference_t<Args>...>(format_str);
|
||||
check_format_string<remove_const_t<remove_reference_t<Args>>...>(format_str);
|
||||
return {args...};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user