File tree Expand file tree Collapse file tree 5 files changed +13
-4
lines changed Expand file tree Collapse file tree 5 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 1
1
#pragma once
2
2
3
+ #include <utility>
3
4
#include "cmd_reader.h"
4
5
#include <winmd_reader.h>
5
6
#include "task_group.h"
Original file line number Diff line number Diff line change 6
6
#include < sstream>
7
7
#include < string>
8
8
#include < string_view>
9
+ #include < vector>
9
10
10
11
namespace cppwinrt
11
12
{
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ WINRT_EXPORT namespace winrt
47
47
48
48
static time_point from_time_t (time_t time) noexcept
49
49
{
50
- return from_sys (std::chrono::system_clock::from_time_t (time));
50
+ return std::chrono::time_point_cast<duration>( from_sys (std::chrono::system_clock::from_time_t (time) ));
51
51
}
52
52
53
53
static file_time to_file_time (time_point const & time) noexcept
Original file line number Diff line number Diff line change 6
6
#include < charconv>
7
7
#include < chrono>
8
8
#include < cstddef>
9
+ #include < cstring>
9
10
#include < iterator>
10
11
#include < map>
11
12
#include < memory>
20
21
#include < utility>
21
22
#include < vector>
22
23
24
+ #if __has_include(<version>)
25
+ #include < version>
26
+ #endif
27
+
23
28
#if __has_include(<windowsnumerics.impl.h>)
24
29
#define WINRT_IMPL_NUMERICS
25
30
#include < directxmath.h>
@@ -50,7 +55,7 @@ namespace winrt::impl
50
55
using suspend_never = std::suspend_never;
51
56
}
52
57
53
- #else
58
+ #elif __has_include(<experimental/coroutine>)
54
59
55
60
#include < experimental/coroutine>
56
61
@@ -63,4 +68,6 @@ namespace winrt::impl
63
68
using suspend_never = std::experimental::suspend_never;
64
69
}
65
70
71
+ #else
72
+ #error C++/WinRT requires coroutine support, which is currently missing. Try enabling C++20 in your compiler.
66
73
#endif
Original file line number Diff line number Diff line change @@ -55,9 +55,9 @@ WINRT_EXPORT namespace winrt
55
55
return left < std::wstring_view (right);
56
56
}
57
57
58
- bool operator <(hstring const & left, nullptr_t ) = delete ;
58
+ bool operator <(hstring const & left, std:: nullptr_t ) = delete ;
59
59
60
- bool operator <(nullptr_t , hstring const & right) = delete ;
60
+ bool operator <(std:: nullptr_t , hstring const & right) = delete ;
61
61
inline bool operator !=(hstring const & left, hstring const & right) noexcept { return !(left == right); }
62
62
inline bool operator >(hstring const & left, hstring const & right) noexcept { return right < left; }
63
63
inline bool operator <=(hstring const & left, hstring const & right) noexcept { return !(right < left); }
You can’t perform that action at this time.
0 commit comments