void (*command_output_func)(FILE *, ucl_object_t *obj);
};
-static const constexpr auto rspamc_commands = rspamd::array_of<rspamc_command>(
+static const constexpr auto rspamc_commands = rspamd::array_of(
rspamc_command{
.cmd = RSPAMC_COMMAND_SYMBOLS,
.name = "symbols",
#define TAG_DEF(id, name, flags) html_tag_def{(name), (id), (flags)}
-static const auto html_tag_defs_array = rspamd::array_of<html_tag_def>(
+static const auto html_tag_defs_array = rspamd::array_of(
/* W3C defined elements */
TAG_DEF(Tag_A, "a", FL_HREF),
TAG_DEF(Tag_ABBR, "abbr", (CM_INLINE)),
/*
* Creates std::array from a standard C style array with automatic size calculation
*/
-template <typename V, typename... T>
-constexpr auto array_of(T&&... t) -> std::array<V, sizeof...(T)>
+template <typename... Ts>
+constexpr auto array_of(Ts&&... t) -> std::array<typename std::decay_t<typename std::common_type_t<Ts...>>, sizeof...(Ts)>
{
+ using T = typename std::decay_t<typename std::common_type_t<Ts...>>;
return {{ std::forward<T>(t)... }};
}