diff --git a/stl/inc/iomanip b/stl/inc/iomanip index 60a049221a..8884dc94ba 100644 --- a/stl/inc/iomanip +++ b/stl/inc/iomanip @@ -25,15 +25,6 @@ template struct _Fillobj { // store fill character _Fillobj(_Elem _Ch) : _Fill(_Ch) {} - template - friend basic_istream<_Elem2, _Traits>& operator>>(basic_istream<_Elem2, _Traits>& _Istr, const _Fillobj& _Manip) { - // set fill character in input stream - static_assert(is_same_v<_Elem, _Elem2>, "wrong character type for setfill"); - - _Istr.fill(_Manip._Fill); - return _Istr; - } - template friend basic_ostream<_Elem2, _Traits>& operator<<(basic_ostream<_Elem2, _Traits>& _Ostr, const _Fillobj& _Manip) { // set fill character in output stream diff --git a/tests/std/tests/VSO_0000000_instantiate_iterators_misc/test.compile.pass.cpp b/tests/std/tests/VSO_0000000_instantiate_iterators_misc/test.compile.pass.cpp index 39008f0146..7ade4b41b1 100644 --- a/tests/std/tests/VSO_0000000_instantiate_iterators_misc/test.compile.pass.cpp +++ b/tests/std/tests/VSO_0000000_instantiate_iterators_misc/test.compile.pass.cpp @@ -571,11 +571,11 @@ void future_test() { } #endif // _M_CEE_PURE -template -void iomanip_test_impl(IoManipIn in, IoManipOut out) { +template +void iomanip_test_impl(IoManipOut out, IoManipIn in) { stringstream ss{}; - ss << in; - ss >> out; + ss << out; + ss >> in; } template @@ -583,6 +583,12 @@ void iomanip_test_impl(IoManip iom) { iomanip_test_impl(iom, iom); } +template +void iomanip_test_impl_for_setfill(IoManip out) { + stringstream ss{}; + ss << out; +} + void iomanip_test() { auto sf = setfill('*'); long double money = 123.45; @@ -591,7 +597,7 @@ void iomanip_test() { localtime_s(&time, &t); string str = "string with \" quotes "; - iomanip_test_impl(sf); + iomanip_test_impl_for_setfill(sf); iomanip_test_impl(put_money(money), get_money(money)); iomanip_test_impl(put_time(&time, "%c %Z"), get_time(&time, "%c %Z")); iomanip_test_impl(quoted(str.c_str()), quoted(str));