Make rpc_inc() and rpc_dec() private

This commit is contained in:
josh committed 2026-02-25 09:15:01 -05:00
1 parent 93527f8647
commit 27420c507d
1 file changed
+3 -3
+3 -3
View File
@@ -275,7 +275,8 @@ rcp<T> rcp_dynamic_cast(rcp<U> && other)
}
#define rcp_managed_root(classname) \
public: \
private: \
mutable std::atomic<int> ref_count{0}; \
void rcp_inc() const \
{ \
ref_count.fetch_add(1, std::memory_order_relaxed); \
@@ -291,8 +292,7 @@ rcp<T> rcp_dynamic_cast(rcp<U> && other)
{ \
return ref_count.load(std::memory_order_relaxed); \
} \
private: \
mutable std::atomic<int> ref_count{0}; \
template <typename T> friend class rcp; \
rcp_managed(classname)
#define rcp_managed(classname) \