Skip to content

Commit

Permalink
perf: Prevent non-array uses fixed_array_size
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Mar 16, 2024
1 parent f3d609b commit e6c68e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/common/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ constexpr bool is_fixed_array = false;
template <template <typename, size_t> typename arr_t, typename value_t, size_t size>
constexpr bool is_fixed_array<arr_t<value_t, size>> = true;

template <typename T, typename = void>
template <typename T, typename = std::enable_if_t<is_fixed_array<T>>>
constexpr size_t fixed_array_size = 0;
template <template <typename, size_t> typename arr_t, typename value_t, size_t size>
constexpr size_t fixed_array_size<arr_t<value_t, size>> = size;
Expand Down

0 comments on commit e6c68e0

Please sign in to comment.