mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
std::atomic<T> may not have value_type
This commit is contained in:
parent
98c367a380
commit
90c60ddd58
@ -122,7 +122,11 @@ struct prod_cons<relat::single, relat::multi, trans::broadcast> {
|
|||||||
template <std::size_t DataSize>
|
template <std::size_t DataSize>
|
||||||
constexpr static std::size_t elem_param = DataSize;
|
constexpr static std::size_t elem_param = DataSize;
|
||||||
|
|
||||||
using rc_t = typename decltype(detail::elem_head::rc_)::value_type;
|
/*
|
||||||
|
<Remarks> std::atomic<T> may not have value_type.
|
||||||
|
See: https://stackoverflow.com/questions/53648614/what-happened-to-stdatomicxvalue-type
|
||||||
|
*/
|
||||||
|
using rc_t = decltype(detail::elem_head::rc_.load());
|
||||||
|
|
||||||
detail::u2_t cursor() const noexcept {
|
detail::u2_t cursor() const noexcept {
|
||||||
return wt_.load(std::memory_order_acquire);
|
return wt_.load(std::memory_order_acquire);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user