-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingfixedSomething works now, yay!Something works now, yay!
Description
Describe the bug
std::ios_base::openmode is not implemented as a bitmask type, therefore, for example, |= operator usage fails to compile.
Command-line test case
C:\Temp>type example.cpp
#include <ios>
int main()
{
auto open_flags = std::ios::binary;
open_flags |= std::ios::app;
return 0;
}
C:\Temp>cl -std:c++17 .\example.cpp
example.cpp
<source>(6): error C2678: binary '|=': no operator found which takes a left-hand operand of type 'std::_Iosb<int>::_Openmode' (or there is no acceptable conversion)
C:/data/msvc/14.21.27702.2/include\cstddef(70): note: could be 'std::byte &std::operator |=(std::byte &,const std::byte) noexcept' [found using argument-dependent lookup]
<source>(6): note: while trying to match the argument list '(std::_Iosb<int>::_Openmode, const std::_Iosb<int>::_Openmode)'
Compiler returned: 2
Expected behavior
compile successfully
STL version
Microsoft (R) C/C++ Optimizing Compiler Version 19.21.27702.2 for x64
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfixedSomething works now, yay!Something works now, yay!