forked from lewissbaker/cppcoro
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfile_buffering_mode.hpp
More file actions
32 lines (28 loc) · 892 Bytes
/
file_buffering_mode.hpp
File metadata and controls
32 lines (28 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
///////////////////////////////////////////////////////////////////////////////
// Copyright (c) Lewis Baker
// Licenced under MIT license. See LICENSE.txt for details.
///////////////////////////////////////////////////////////////////////////////
#ifndef CPPCORO_FILE_BUFFERING_MODE_HPP_INCLUDED
#define CPPCORO_FILE_BUFFERING_MODE_HPP_INCLUDED
namespace cppcoro
{
enum class file_buffering_mode
{
default_ = 0,
sequential = 1,
random_access = 2,
unbuffered = 4,
write_through = 8,
temporary = 16
};
constexpr file_buffering_mode operator&(file_buffering_mode a, file_buffering_mode b)
{
return static_cast<file_buffering_mode>(
static_cast<int>(a) & static_cast<int>(b));
}
constexpr file_buffering_mode operator|(file_buffering_mode a, file_buffering_mode b)
{
return static_cast<file_buffering_mode>(static_cast<int>(a) | static_cast<int>(b));
}
}
#endif