Thanks to visit codestin.com
Credit goes to github.com

Skip to content

<iomanip>: consider removing operator>> for istream >> setfill(c) #3724

@achabense

Description

@achabense

According to the standard(this version), std::setfill is only for ostreams. Therefore, istream >> setfill(c) has no well-defined meaning and can lead to confusion.
image
The following piece of code should get removed.

STL/stl/inc/iomanip

Lines 28 to 35 in a621095

template <class _Elem2, class _Traits>
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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixedSomething works now, yay!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions