Make narrow constexpr (#698)

This commit is contained in:
Johel Ernesto Guerrero Peña
2019-01-14 18:37:37 -08:00
committed by Anna Gringauze
parent 9ff6e19ea9
commit 6eeed739f1
2 changed files with 13 additions and 0 deletions
+4
View File
@@ -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
}