Extracted intrusive_ref_counter from Boost.Log. The extracted version supports customizing the reference counter nature, two policies provided: thread_unsafe_counter and thread_safe_counter.

[SVN r85535]
This commit is contained in:
Andrey Semashev
2013-08-31 19:54:11 +00:00
parent 172afff6ca
commit a7d96b4762
5 changed files with 418 additions and 1 deletions
+3 -1
View File
@@ -24,7 +24,9 @@
compilers that support argument-dependent lookup, <STRONG>intrusive_ptr_add_ref</STRONG>
and <STRONG>intrusive_ptr_release</STRONG> should be defined in the namespace
that corresponds to their parameter; otherwise, the definitions need to go in
namespace <STRONG>boost</STRONG>.</p>
namespace <STRONG>boost</STRONG>. The library provides a helper base class template
<STRONG><a href="intrusive_ref_counter.html">basic_intrusive_ref_counter</a></STRONG> which may
help adding support for <STRONG>intrusive_ptr</STRONG> to user&apos;s types.</p>
<p>The class template is parameterized on <b>T</b>, the type of the object pointed
to. <STRONG>intrusive_ptr&lt;T&gt;</STRONG> can be implicitly converted to <STRONG>intrusive_ptr&lt;U&gt;</STRONG>
whenever <STRONG>T*</STRONG> can be implicitly converted to <STRONG>U*</STRONG>.</p>