forked from microsoft/GSL
Make narrow constexpr (#698)
This commit is contained in:
committed by
Anna Gringauze
parent
9ff6e19ea9
commit
6eeed739f1
@@ -126,4 +126,8 @@ TEST_CASE("narrow")
|
||||
|
||||
n = -42;
|
||||
CHECK_THROWS_AS(narrow<unsigned>(n), narrowing_error);
|
||||
|
||||
#if GSL_CONSTEXPR_NARROW
|
||||
static_assert(narrow<char>(120) == 120, "Fix GSL_CONSTEXPR_NARROW");
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user