MCPcopy Create free account
hub / github.com/DmitriBogdanov/UTL / open_file

Function open_file

examples/module_bit/using_enum_bitflags.cpp:11–15  ·  view source on GitHub ↗

Function taking enum flags

Source from the content-addressed store, hash-verified

9
10// Function taking enum flags
11void open_file(bit::Flags<IOMode> flags) {
12 if (flags.contains(IOMode::IN) ) std::cout << " > File opened for reading \n";
13 if (flags.contains(IOMode::OUT)) std::cout << " > File opened for writing \n";
14 if (flags.contains(IOMode::APP)) std::cout << " > File opened for appending \n";
15}
16
17int main() {
18 std::cout << "Opening file with OUT: \n";

Callers 1

mainFunction · 0.85

Calls 1

containsMethod · 0.45

Tested by

no test coverage detected