File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -372,7 +372,7 @@ class bitset {
372372 [[nodiscard]] constexpr auto operator ~() const -> bitset {
373373 bitset result{};
374374 for (auto i = std::size_t {}; i < storage_size; ++i) {
375- result.storage [i] = ~storage[i];
375+ result.storage [i] = static_cast < elem_t >( ~storage[i]) ;
376376 }
377377 return result;
378378 }
Original file line number Diff line number Diff line change @@ -255,19 +255,16 @@ template <typename T> constexpr auto is_ct_v<T const> = is_ct_v<T>;
255255
256256#ifndef CT_WRAP
257257#define CT_WRAP (...) \
258- [&](auto f) { \
258+ [&](auto f) constexpr { \
259259 if constexpr (::stdx::is_ct_v<decltype (f ())>) { \
260260 return f (); \
261- } else if constexpr (requires { \
262- ::stdx::ct<[&]() constexpr { \
263- return __VA_ARGS__; \
264- }()>; \
265- }) { \
266- return ::stdx::ct<[&]() constexpr { return __VA_ARGS__; }()>(); \
261+ } else if constexpr (requires { ::stdx::ct<f ()>(); } or \
262+ std::is_empty_v<decltype (f)>) { \
263+ return ::stdx::ct<f ()>(); \
267264 } else { \
268265 return f (); \
269266 } \
270- }([&] { return __VA_ARGS__; })
267+ }([&]() constexpr { return __VA_ARGS__; })
271268#endif
272269
273270#ifndef CX_DETECT
You can’t perform that action at this time.
0 commit comments