forked from microsoft/GSL
simplify to_byte (#1090)
- to_byte_impl is not necessary, the same can be achieved with shorter code - add test code for things that should not compile
This commit is contained in:
@@ -61,6 +61,12 @@ TEST(byte_tests, construction)
|
||||
EXPECT_TRUE(static_cast<unsigned char>(b) == 14);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIRM_COMPILATION_ERRORS
|
||||
to_byte(char{});
|
||||
to_byte(3);
|
||||
to_byte(3u);
|
||||
#endif
|
||||
}
|
||||
|
||||
TEST(byte_tests, bitwise_operations)
|
||||
|
||||
Reference in New Issue
Block a user