CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
day_of_week.h
1
2#pragma once
3
4#include <system/details/enum_meta_info.h>
5#include <system/enum_helpers.h>
6
7namespace System {
8
10enum class DayOfWeek : int
11{
12 Sunday = 0,
13 Monday,
14 Tuesday,
17 Friday,
19};
20
25inline auto operator-(DayOfWeek a, DayOfWeek b)
26{
27 using underlying_type = std::underlying_type<DayOfWeek>::type;
28 return static_cast<underlying_type>(a) - static_cast<underlying_type>(b);
29}
30
33DECLARE_ENUM_OPERATORS(System::DayOfWeek);
35DECLARE_USING_GLOBAL_OPERATORS
37} // namespace System
38
40DECLARE_USING_ENUM_OPERATORS(System);
41
43template<>
44struct EnumMetaInfo<System::DayOfWeek>
45{
47 static ASPOSECPP_SHARED_API const std::array<std::pair<System::DayOfWeek, const char16_t*>, 7>& values();
48};
Definition: db_command.h:9
auto operator-(DayOfWeek a, DayOfWeek b)
Calculates the number of days between two days of week.
Definition: day_of_week.h:25
DayOfWeek
Enumeration that represents a day of week.
Definition: day_of_week.h:11