diff --git a/include/seqan3/core/debug_stream/debug_stream_type.hpp b/include/seqan3/core/debug_stream/debug_stream_type.hpp index 36c88e5756..df18d88f1f 100644 --- a/include/seqan3/core/debug_stream/debug_stream_type.hpp +++ b/include/seqan3/core/debug_stream/debug_stream_type.hpp @@ -185,12 +185,17 @@ class debug_stream_type stream->unsetf(flag); } +// fmtflags are an enum in libstc++ and unsigned in libc++ +#ifdef _LIBCPP_VERSION + static_assert(std::same_as); +#else //!\copybrief setf() debug_stream_type & operator<<(fmtflags const flag) { setf(flag); return *this; } +#endif //!\} /*!\name Format flags (seqan3::fmtflags2) diff --git a/test/unit/core/debug_stream_test.cpp b/test/unit/core/debug_stream_test.cpp index 33b4693bb5..902e7d97cd 100644 --- a/test/unit/core/debug_stream_test.cpp +++ b/test/unit/core/debug_stream_test.cpp @@ -286,3 +286,14 @@ TEST(debug_stream_test, byte) o.flush(); EXPECT_EQ(o.str(), "40,244"); } + +TEST(debug_stream_test, integers) +{ + std::ostringstream o{}; + seqan3::debug_stream_type my_stream{o}; + + my_stream << uint8_t{1} << ',' << uint16_t{2} << ',' << uint32_t{3} << ',' << uint64_t{4} << ',' << size_t{5} << ',' + << int8_t{6} << ',' << int16_t{7} << ',' << int32_t{8} << ',' << int64_t{9}; + o.flush(); + EXPECT_EQ(o.str(), "1,2,3,4,5,6,7,8,9"); +}