Commit 9d6a3704 authored by Po Yen Chen's avatar Po Yen Chen
Browse files

Avoid using reference type in type trait

parent 8aa3f1be
......@@ -146,9 +146,10 @@ struct tile_window_with_static_distribution
// check if window_lengths is matching the shape of tile_distribution
static_assert(WindowLengths::size() == TileDstr::NDimX);
static_for<0, TileDstr::NDimX, 1>{}([&](auto dim) {
if constexpr(is_number_v<decltype(window_lengths[dim])>)
if constexpr(is_number_v<remove_cvref_t<decltype(window_lengths[dim])>>)
{
constexpr index_t window_length = decltype(window_lengths[dim])::value;
constexpr index_t window_length =
remove_cvref_t<decltype(window_lengths[dim])>::value;
static_assert(window_length == TileDstr::get_lengths()[dim]);
}
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment