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 11#pragma once
22
3+ #include <utility>
34#include "cmd_reader.h"
45#include <winmd_reader.h>
56#include "task_group.h"
Original file line number Diff line number Diff line change 66#include < sstream>
77#include < string>
88#include < string_view>
9+ #include < vector>
910
1011namespace cppwinrt
1112{
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ WINRT_EXPORT namespace winrt
4747
4848 static time_point from_time_t (time_t time) noexcept
4949 {
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) ));
5151 }
5252
5353 static file_time to_file_time (time_point const & time) noexcept
Original file line number Diff line number Diff line change 66#include < charconv>
77#include < chrono>
88#include < cstddef>
9+ #include < cstring>
910#include < iterator>
1011#include < map>
1112#include < memory>
2021#include < utility>
2122#include < vector>
2223
24+ #if __has_include(<version>)
25+ #include < version>
26+ #endif
27+
2328#if __has_include(<windowsnumerics.impl.h>)
2429#define WINRT_IMPL_NUMERICS
2530#include < directxmath.h>
@@ -50,7 +55,7 @@ namespace winrt::impl
5055 using suspend_never = std::suspend_never;
5156}
5257
53- #else
58+ #elif __has_include(<experimental/coroutine>)
5459
5560#include < experimental/coroutine>
5661
@@ -63,4 +68,6 @@ namespace winrt::impl
6368 using suspend_never = std::experimental::suspend_never;
6469}
6570
71+ #else
72+ #error C++/WinRT requires coroutine support, which is currently missing. Try enabling C++20 in your compiler.
6673#endif
Original file line number Diff line number Diff line change @@ -55,9 +55,9 @@ WINRT_EXPORT namespace winrt
5555 return left < std::wstring_view (right);
5656 }
5757
58- bool operator <(hstring const & left, nullptr_t ) = delete ;
58+ bool operator <(hstring const & left, std:: nullptr_t ) = delete ;
5959
60- bool operator <(nullptr_t , hstring const & right) = delete ;
60+ bool operator <(std:: nullptr_t , hstring const & right) = delete ;
6161 inline bool operator !=(hstring const & left, hstring const & right) noexcept { return !(left == right); }
6262 inline bool operator >(hstring const & left, hstring const & right) noexcept { return right < left; }
6363 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