Skip to content

Commit 93be135

Browse files
committed
fix: enforce specialization
- Previously, on MSVC, in c++20, the empty() function was incorrectly deduced - Hence the test_xbuilder no longer pass - I suggest enforce the right specialization by specifying the last template parameter
1 parent 7a0d20e commit 93be135

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/test_xbuilder.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,8 @@ namespace xt
676676

677677
xt::dynamic_shape<std::size_t> sd = {3, 2, 1};
678678
auto ed1 = empty<double>(sd);
679-
auto ed2 = empty<double, layout_type::column_major>(dynamic_shape<std::size_t>({3, 3, 3}));
679+
using ShapeType = xt::dynamic_shape<std::size_t>;
680+
auto ed2 = empty<double, xt::layout_type::column_major, ShapeType>(ShapeType({3, 3, 3}));
680681
auto ed3 = empty<double>(std::vector<std::size_t>({3, 3, 3}));
681682
b = std::is_same<decltype(ed1), xarray<double>>::value;
682683
EXPECT_TRUE(b);

0 commit comments

Comments
 (0)