mirror of
https://github.com/CLIUtils/CLI11.git
synced 2026-01-19 04:52:08 +00:00
fix: promoting uint8_t/int8_t to make it casting result printable (#1132)
The underlying type of uint8_t/int8_t is unsigned char and signed char, but IOStreams was specified to treat them just like char. so promoting the casting value to get the expected value. Signed-off-by: ComixHe <ComixHe1895@outlook.com>
This commit is contained in:
@@ -38,6 +38,9 @@ TEST_CASE("TypeTools: Streaming", "[helpers]") {
|
||||
|
||||
CHECK(std::string("string") == CLI::detail::to_string("string"));
|
||||
CHECK(std::string("string") == CLI::detail::to_string(std::string("string")));
|
||||
|
||||
enum class t1 : std::uint8_t { enum1, enum2 };
|
||||
CHECK(CLI::detail::to_string(t1::enum1) == "0");
|
||||
}
|
||||
|
||||
TEST_CASE("TypeTools: tuple", "[helpers]") {
|
||||
|
||||
Reference in New Issue
Block a user