Skip to content

Commit de99433

Browse files
committed
Add element-to-array test for is_convertible_without_narrowing
1 parent 66ca64b commit de99433

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

test/type_traits.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,9 @@ TEST_CASE("is_convertible_without_narrowing: array and function types")
406406
STATIC_CHECK(iris::is_convertible_without_narrowing_v<int[3], int const*>);
407407
STATIC_CHECK(!iris::is_convertible_without_narrowing_v<int*, int[3]>);
408408

409+
// Element types to array types
410+
STATIC_CHECK(!iris::is_convertible_without_narrowing_v<int, int[3]>);
411+
409412
// char[] to string
410413
STATIC_CHECK(iris::is_convertible_without_narrowing_v<char[5], std::string>);
411414

0 commit comments

Comments
 (0)