Skip to content

Commit 73ca04e

Browse files
committed
update to support clang21 and libfmt12 support
1 parent 826cd46 commit 73ca04e

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

co-cpp19.qbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Project {
3232

3333
Export {
3434
Depends { name: "cpp" }
35-
cpp.cxxLanguageVersion: "c++2a"
35+
cpp.cxxLanguageVersion: "c++23"
3636
cpp.treatWarningsAsErrors: true
3737

3838
Properties {

src/coro19.lib/coro19/coroutine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22

33
// requires C++ 17 __has_include
4-
#if __has_include(<yvals_core.h>)
4+
#if defined(_MSC_VER) && __has_include(<yvals_core.h>)
55
# include <yvals_core.h>
66
#endif
77
#if __has_include(<version>)

src/coro19.lib/coro19/coroutine.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#pragma once
1717

1818
// requires C++ 17 __has_include
19-
#if __has_include(<yvals_core.h>)
19+
#if defined(_MSC_VER) && __has_include(<yvals_core.h>)
2020
# include <yvals_core.h>
2121
#endif
2222
#if __has_include(<version>)
@@ -300,8 +300,7 @@ template<typename _PromiseT> struct hash<coroutine_handle<_PromiseT>> {
300300
using result_type = size_t;
301301

302302
[[nodiscard]] //
303-
result_type
304-
operator()(argument_type const& _Handle) const noexcept {
303+
result_type operator()(argument_type const& _Handle) const noexcept {
305304
return hash<void*>()(_Handle.address());
306305
}
307306
};

src/signal19.lib/signal19/SignalWith.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ template<class... Args> struct SignalWith final : details::Signal {
8888

8989
/// Type Erasure for CallbackCancellation
9090
struct StoredCancellation {
91-
using Storage =
92-
std::aligned_storage_t<sizeof(SignalCancellation) + 2 * sizeof(void*), alignof(SignalCancellation)>;
93-
Storage storage; // fixed size storage
91+
using Storage = uint8_t[sizeof(SignalCancellation) + 2 * sizeof(void*)];
92+
alignas(SignalCancellation) Storage storage; // fixed size storage
9493

9594
template<class Cb> explicit StoredCancellation(SignalWith& signal, Cb&& cb) {
9695
using Clean = std::remove_const_t<std::remove_reference_t<Cb>>;

src/tuple19.lib/tuple19/Tuple.fmt.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ namespace tuple19 {
88

99
/// use values of the tuple as format arguments
1010
/// note: you still have to craft the proper format string!
11-
/// usage: vformat(formatStr, tuple19::make_format_args(argsTuple));
12-
template<class... Ts> constexpr auto make_format_args(Tuple<Ts...> const& args) {
11+
/// usage: vformat(formatStr, tuple19::vargs(argsTuple));
12+
template<class... Ts> constexpr auto vargs(Tuple<Ts...> const& args) {
1313
return [&]<size_t... Is>(std::index_sequence<Is...> const&) {
14-
return fmt::make_format_args(args.template at<Is>()...);
14+
return fmt::vargs<Ts...>{{args.template at<Is>()...}};
1515
}(std::make_index_sequence<sizeof...(Ts)>{});
1616
}
1717

0 commit comments

Comments
 (0)