libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT > Class Template Referencefinal

A shared pointer-type that has threading specified as a trait, and uses an intrusive count to save on calls to the memory allocator, which could cause excessive contention on the memory manager in a multi-threaded environment. More...

#include <shared_ptr.hpp>

Public Types

using value_type = V
 A convenience typedef to the type to be controlled. More...
 
using element_type = value_type
 A convenience typedef to the type to be controlled. More...
 
using lock_traits = LkT
 
using atomic_ptr_t = typename lock_traits::template atomic< value_type * >
 The (potentially) lock-free pointer type. More...
 
using base_ctr_type = sp_counter_itf_type< long >
 The counter interface to be used on the controlled type, which allows the counter-type to be specified at compile or run-time. More...
 
using ctr_type = typename V::atomic_ctr_t
 
using exception_type = typename lock_traits::exception_type
 
using deleter_t = typename value_type::deleter_t
 Make sure the correct object-deletion mechanism is used. More...
 
using no_ref_counting = typename lock_traits::template noop_atomic_ctr< typename ctr_type::value_type >
 The no-op atomic counter does nothing, therefore the shared_ptr must not manage the memory of such objects... More...
 
using no_deletion = noop_dtor< typename value_type::deleter_t::element_type >
 

Public Member Functions

 BOOST_MPL_ASSERT ((std::is_base_of< base_ctr_type, value_type >))
 
atomic_ptr_t __fastcall release () noexcept(true)
 
constexpr __stdcall shared_ptr () noexcept(true)
 
__stdcall shared_ptr (value_type *ptr) noexcept(true)
 
template<class V1 >
__stdcall shared_ptr (V1 *ptr) noexcept(true)
 
__stdcall shared_ptr (atomic_ptr_t const &ptr) noexcept(true)
 
template<class V1 >
__stdcall shared_ptr (sp_counter_itf_type< V1 > const &ptr) noexcept(true)
 
template<class V1 , template< class > class At>
__stdcall shared_ptr (At< V1 * > const &ptr) noexcept(true)
 
__stdcall shared_ptr (std::unique_ptr< value_type, deleter_t > &ptr) noexcept(true)
 
template<class V1 >
__stdcall shared_ptr (std::unique_ptr< V1, typename V1::deleter_t > &ptr) noexcept(true)
 
__stdcall shared_ptr (std::unique_ptr< value_type, deleter_t > &&ptr) noexcept(true)
 
template<class V1 >
__stdcall shared_ptr (std::unique_ptr< V1, typename V1::deleter_t > &&ptr) noexcept(true)
 
template<class V2 , class LkT2 >
JMMCG_MSVC_STDCALL_HACK shared_ptr (const shared_ptr< V2, LkT2 > &s) noexcept(true)
 
template<class V2 , class LkT2 >
JMMCG_MSVC_STDCALL_HACK shared_ptr (shared_ptr< V2, LkT2 > &&s) noexcept(true)
 
 shared_ptr (const shared_ptr &s) noexcept(true)
 
 shared_ptr (shared_ptr &&s) noexcept(true)
 
__stdcall ~shared_ptr () noexcept(true)
 
template<class V2 , class LkT2 >
void operator= (const shared_ptr< V2, LkT2 > &s) noexcept(true)
 
template<class V2 , class LkT2 >
void operator= (shared_ptr< V2, LkT2 > &&s) noexcept(true)
 
void operator= (const shared_ptr &s) noexcept(true)
 
void operator= (shared_ptr &&s) noexcept(true)
 
void __fastcall reset () noexcept(true)
 
constexpr bool __fastcall operator== (const shared_ptr &s) const noexcept(true)
 
constexpr bool __fastcall operator!= (const shared_ptr &s) const noexcept(true)
 
constexpr bool __fastcall operator< (const shared_ptr &s) const noexcept(true)
 
constexpr bool __fastcall operator> (const shared_ptr &s) const noexcept(true)
 
constexpr operator bool () const noexcept(true)
 
constexpr const atomic_ptr_t &__fastcall get () const noexcept(true)
 
atomic_ptr_t &__fastcall get () noexcept(true)
 
constexpr const value_type &__fastcall operator* () const noexcept(true)
 
value_type &__fastcall operator* () noexcept(true)
 
constexpr value_type const *__fastcall operator-> () const noexcept(true)
 
value_type *__fastcall operator-> () noexcept(true)
 
void swap (shared_ptr &s) noexcept(true)
 
tstring to_string () const noexcept(false)
 
template<class V1 >
 shared_ptr (V1 *ptr) noexcept(true)
 
template<class V1 >
 shared_ptr (sp_counter_itf_type< V1 > const &ptr) noexcept(true)
 
template<class V1 , template< class > class At>
 shared_ptr (At< V1 * > const &ptr) noexcept(true)
 
template<class V1 >
 shared_ptr (std::unique_ptr< V1, typename V1::deleter_t > &d) noexcept(true)
 
template<class V1 >
 shared_ptr (std::unique_ptr< V1, typename V1::deleter_t > &&d) noexcept(true)
 
template<typename V2 , class LkT2 >
 shared_ptr (const shared_ptr< V2, LkT2 > &s) noexcept(true)
 
template<typename V2 , class LkT2 >
 shared_ptr (shared_ptr< V2, LkT2 > &&s) noexcept(true)
 

Static Public Attributes

static constexpr ppd::generic_traits::memory_access_modes memory_access_mode
 

Friends

template<class , class >
class shared_ptr
 
tostream &__fastcall operator<< (tostream &os, shared_ptr const &ptr) noexcept(false)
 

Detailed Description

template<class V, class LkT>
class jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >

A shared pointer-type that has threading specified as a trait, and uses an intrusive count to save on calls to the memory allocator, which could cause excessive contention on the memory manager in a multi-threaded environment.

I don't use boost::shared_ptr nor std::shared_ptr as they are insufficiently flexible for my purposes: the multi-threading model they use is not a trait, moreover their counters & deleters can only be specified at compile-time, not also at run-time. This class uses a lock-free implementation based upon the careful use of the sp_counter_type that uses a specialised atomic_counter_type. For performance tests see 'examples/shared_ptr_parallel.cpp'.

See also
sp_counter_itf_type, sp_counter_type

Definition at line 129 of file shared_ptr.hpp.

Member Typedef Documentation

◆ atomic_ptr_t

template<class V , class LkT >
using jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::atomic_ptr_t = typename lock_traits::template atomic<value_type *>

The (potentially) lock-free pointer type.

We need the operations on the contained pointer (to the managed object) to be atomic because the move operations might occur on more than one thread, and therefore there is a race condition on non-SMP architectures, which is avoided if (in the implementation) the operations on the contained pointer are atomic.

Definition at line 138 of file shared_ptr.hpp.

◆ base_ctr_type

template<class V , class LkT >
using jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::base_ctr_type = sp_counter_itf_type<long>

The counter interface to be used on the controlled type, which allows the counter-type to be specified at compile or run-time.

Definition at line 140 of file shared_ptr.hpp.

◆ ctr_type

template<class V , class LkT >
using jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::ctr_type = typename V::atomic_ctr_t

Definition at line 141 of file shared_ptr.hpp.

◆ deleter_t

template<class V , class LkT >
using jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::deleter_t = typename value_type::deleter_t

Make sure the correct object-deletion mechanism is used.

See also
sp_counter_itf_type::deleter_t, sp_counter_itf_type::deleter(), ~shared_ptr()

Definition at line 147 of file shared_ptr.hpp.

◆ element_type

template<class V , class LkT >
using jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::element_type = value_type

A convenience typedef to the type to be controlled.

Definition at line 132 of file shared_ptr.hpp.

◆ exception_type

template<class V , class LkT >
using jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::exception_type = typename lock_traits::exception_type

Definition at line 142 of file shared_ptr.hpp.

◆ lock_traits

template<class V , class LkT >
using jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::lock_traits = LkT

This does not have to be the same as the element_type, as it may not contain any lock_traits, or we may want the flexibility to deal with the type differently in this case.

Definition at line 133 of file shared_ptr.hpp.

◆ no_deletion

template<class V , class LkT >
using jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::no_deletion = noop_dtor<typename value_type::deleter_t::element_type>

If you get a compilation issue here, check you aren't using std::default_delete, but libjmmcg::default_delete instead.

See also
libjmmcg::default_delete

Definition at line 158 of file shared_ptr.hpp.

◆ no_ref_counting

template<class V , class LkT >
using jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::no_ref_counting = typename lock_traits::template noop_atomic_ctr<typename ctr_type::value_type>

The no-op atomic counter does nothing, therefore the shared_ptr must not manage the memory of such objects...

See also
noop_atomic_ctr

Definition at line 152 of file shared_ptr.hpp.

◆ value_type

template<class V , class LkT >
using jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::value_type = V

A convenience typedef to the type to be controlled.

Definition at line 131 of file shared_ptr.hpp.

Constructor & Destructor Documentation

◆ shared_ptr() [1/21]

template<class V , class LkT >
constexpr __stdcall jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( )
inlineconstexprnoexcept

Definition at line 178 of file shared_ptr.hpp.

◆ shared_ptr() [2/21]

template<class V , class LkT >
jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( value_type ptr)
inlineexplicitnoexcept
Parameters
ptrNote that this ptr could have a non-zero reference count, and this ctor will take ownership of the ptr, respecting that reference count, only deleting the ptr if it reaches zero.

Definition at line 55 of file shared_ptr_impl.hpp.

◆ shared_ptr() [3/21]

template<class V , class LkT >
template<class V1 >
__stdcall jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( V1 *  ptr)
explicitnoexcept
Parameters
ptrNote that this ptr could have a non-zero reference count, and this ctor will take ownership of the ptr, respecting that reference count, only deleting the ptr if it reaches zero. The type of the parameter must be the same type or a class non-privately derived from value_type.

◆ shared_ptr() [4/21]

template<class V , class LkT >
jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( atomic_ptr_t const &  ptr)
inlineexplicitnoexcept
Parameters
ptrNote that this ptr could have a non-zero reference count, and this ctor will take ownership of the ptr, respecting that reference count, only deleting the ptr if it reaches zero.

Definition at line 87 of file shared_ptr_impl.hpp.

◆ shared_ptr() [5/21]

template<class V , class LkT >
template<class V1 >
__stdcall jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( sp_counter_itf_type< V1 > const &  ptr)
explicitnoexcept
Parameters
ptrNote that this ptr could have a non-zero reference count, and this ctor will take ownership of the ptr, respecting that reference count, only deleting the ptr if it reaches zero.

◆ shared_ptr() [6/21]

template<class V , class LkT >
template<class V1 , template< class > class At>
__stdcall jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( At< V1 * > const &  ptr)
explicitnoexcept
Parameters
ptrNote that this ptr could have a non-zero reference count, and this ctor will take ownership of the ptr, respecting that reference count, only deleting the ptr if it reaches zero.

◆ shared_ptr() [7/21]

template<class V , class LkT >
jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( std::unique_ptr< value_type, deleter_t > &  ptr)
inlineexplicitnoexcept
Parameters
ptrNote that this ptr could have a non-zero reference count, and this ctor will take ownership of the ptr, respecting that reference count, only deleting the ptr if it reaches zero.

Definition at line 130 of file shared_ptr_impl.hpp.

◆ shared_ptr() [8/21]

template<class V , class LkT >
template<class V1 >
__stdcall jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( std::unique_ptr< V1, typename V1::deleter_t > &  ptr)
explicitnoexcept
Parameters
ptrNote that this ptr could have a non-zero reference count, and this ctor will take ownership of the ptr, respecting that reference count, only deleting the ptr if it reaches zero. The type of the parameter must be the same type or a class non-privately derived from value_type.

◆ shared_ptr() [9/21]

template<class V , class LkT >
jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( std::unique_ptr< value_type, deleter_t > &&  ptr)
inlineexplicitnoexcept
Parameters
ptrNote that this ptr could have a non-zero reference count, and this ctor will take ownership of the ptr, respecting that reference count, only deleting the ptr if it reaches zero.

Definition at line 159 of file shared_ptr_impl.hpp.

◆ shared_ptr() [10/21]

template<class V , class LkT >
template<class V1 >
__stdcall jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( std::unique_ptr< V1, typename V1::deleter_t > &&  ptr)
explicitnoexcept
Parameters
ptrNote that this ptr could have a non-zero reference count, and this ctor will take ownership of the ptr, respecting that reference count, only deleting the ptr if it reaches zero. The type of the parameter must be the same type or a class non-privately derived from value_type.

◆ shared_ptr() [11/21]

template<class V , class LkT >
template<class V2 , class LkT2 >
JMMCG_MSVC_STDCALL_HACK jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( const shared_ptr< V2, LkT2 > &  s)
explicitnoexcept

Note that the same deleter and threading model must be specified.

Parameters
sThe type of the parameter must be the same type or a class non-privately derived from value_type.

◆ shared_ptr() [12/21]

template<class V , class LkT >
template<class V2 , class LkT2 >
JMMCG_MSVC_STDCALL_HACK jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( shared_ptr< V2, LkT2 > &&  s)
explicitnoexcept

Note that the same deleter and threading model must be specified.

Parameters
sThe type of the parameter must be the same type or a class non-privately derived from value_type.

◆ shared_ptr() [13/21]

template<class V , class LkT >
jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( const shared_ptr< V, LkT > &  s)
inlinenoexcept

Definition at line 188 of file shared_ptr_impl.hpp.

◆ shared_ptr() [14/21]

template<class V , class LkT >
jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( shared_ptr< V, LkT > &&  s)
inlinenoexcept

Definition at line 202 of file shared_ptr_impl.hpp.

◆ ~shared_ptr()

template<class V , class LkT >
jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::~shared_ptr
inlinenoexcept
See also
release()

Definition at line 240 of file shared_ptr_impl.hpp.

◆ shared_ptr() [15/21]

template<class V , class LkT >
template<class V1 >
jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( V1 *  ptr)
inlinenoexcept

Definition at line 69 of file shared_ptr_impl.hpp.

◆ shared_ptr() [16/21]

template<class V , class LkT >
template<class V1 >
jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( sp_counter_itf_type< V1 > const &  ptr)
inlinenoexcept

Definition at line 101 of file shared_ptr_impl.hpp.

◆ shared_ptr() [17/21]

template<class V , class LkT >
template<class V1 , template< class > class At>
jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( At< V1 * > const &  ptr)
inlinenoexcept

Definition at line 115 of file shared_ptr_impl.hpp.

◆ shared_ptr() [18/21]

template<class V , class LkT >
template<class V1 >
jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( std::unique_ptr< V1, typename V1::deleter_t > &  d)
inlinenoexcept

Definition at line 144 of file shared_ptr_impl.hpp.

◆ shared_ptr() [19/21]

template<class V , class LkT >
template<class V1 >
jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( std::unique_ptr< V1, typename V1::deleter_t > &&  d)
inlinenoexcept

Definition at line 172 of file shared_ptr_impl.hpp.

◆ shared_ptr() [20/21]

template<class V , class LkT >
template<typename V2 , class LkT2 >
jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( const shared_ptr< V2, LkT2 > &  s)
inlinenoexcept

◆ shared_ptr() [21/21]

template<class V , class LkT >
template<typename V2 , class LkT2 >
jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::shared_ptr ( shared_ptr< V2, LkT2 > &&  s)
inlinenoexcept

Definition at line 230 of file shared_ptr_impl.hpp.

Member Function Documentation

◆ BOOST_MPL_ASSERT()

template<class V , class LkT >
jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::BOOST_MPL_ASSERT ( (std::is_base_of< base_ctr_type, value_type >)  )

◆ get() [1/2]

template<class V , class LkT >
constexpr shared_ptr< V, LkT >::atomic_ptr_t const & jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::get
inlineconstexprnoexcept

Definition at line 303 of file shared_ptr_impl.hpp.

◆ get() [2/2]

template<class V , class LkT >
shared_ptr< V, LkT >::atomic_ptr_t & jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::get
inlinenoexcept

Definition at line 307 of file shared_ptr_impl.hpp.

◆ operator bool()

template<class V , class LkT >
constexpr jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::operator bool
inlineexplicitconstexprnoexcept

Definition at line 294 of file shared_ptr_impl.hpp.

◆ operator!=()

template<class V , class LkT >
constexpr bool jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::operator!= ( const shared_ptr< V, LkT > &  s) const
inlineconstexprnoexcept

Definition at line 290 of file shared_ptr_impl.hpp.

◆ operator*() [1/2]

template<class V , class LkT >
constexpr shared_ptr< V, LkT >::value_type const & jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::operator*
inlineconstexprnoexcept

Definition at line 311 of file shared_ptr_impl.hpp.

◆ operator*() [2/2]

template<class V , class LkT >
shared_ptr< V, LkT >::value_type & jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::operator*
inlinenoexcept

Definition at line 316 of file shared_ptr_impl.hpp.

◆ operator->() [1/2]

template<class V , class LkT >
constexpr shared_ptr< V, LkT >::value_type const * jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::operator->
inlineconstexprnoexcept

Definition at line 321 of file shared_ptr_impl.hpp.

◆ operator->() [2/2]

template<class V , class LkT >
shared_ptr< V, LkT >::value_type * jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::operator->
inlinenoexcept

Definition at line 325 of file shared_ptr_impl.hpp.

◆ operator<()

template<class V , class LkT >
constexpr bool jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::operator< ( const shared_ptr< V, LkT > &  s) const
inlineconstexprnoexcept

Definition at line 281 of file shared_ptr_impl.hpp.

◆ operator=() [1/4]

template<class V , class LkT >
void jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::operator= ( const shared_ptr< V, LkT > &  s)
inlinenoexcept

Definition at line 269 of file shared_ptr_impl.hpp.

◆ operator=() [2/4]

template<class V , class LkT >
template<typename V2 , class LkT2 >
void jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::operator= ( const shared_ptr< V2, LkT2 > &  s)
inlinenoexcept

Note that the same deleter and threading model must be specified.

Parameters
sThe type of the parameter must be the same type or a class non-privately derived from value_type.

Definition at line 252 of file shared_ptr_impl.hpp.

◆ operator=() [3/4]

template<class V , class LkT >
void jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::operator= ( shared_ptr< V, LkT > &&  s)
inlinenoexcept

Definition at line 276 of file shared_ptr_impl.hpp.

◆ operator=() [4/4]

template<class V , class LkT >
template<typename V2 , class LkT2 >
void jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::operator= ( shared_ptr< V2, LkT2 > &&  s)
inlinenoexcept

Note that the same deleter and threading model must be specified.

Parameters
sThe type of the parameter must be the same type or a class non-privately derived from value_type.

Definition at line 263 of file shared_ptr_impl.hpp.

◆ operator==()

template<class V , class LkT >
constexpr bool jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::operator== ( const shared_ptr< V, LkT > &  s) const
inlineconstexprnoexcept

Definition at line 286 of file shared_ptr_impl.hpp.

◆ operator>()

template<class V , class LkT >
constexpr bool jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::operator> ( const shared_ptr< V, LkT > &  s) const
inlineconstexprnoexcept

Definition at line 298 of file shared_ptr_impl.hpp.

◆ release()

template<class V , class LkT >
shared_ptr< V, LkT >::atomic_ptr_t jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::release
inlinenoexcept

Decrement the reference count & possibly delete the object, via calling value_type::delete() which uses the value_type::deleter_t method to delete the object & release the memory.

Definition at line 26 of file shared_ptr_impl.hpp.

◆ reset()

template<class V , class LkT >
void jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::reset
inlinenoexcept

◆ swap()

template<class V , class LkT >
void jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::swap ( shared_ptr< V, LkT > &  s)
inlinenoexcept

Definition at line 245 of file shared_ptr_impl.hpp.

◆ to_string()

template<class V , class LkT >
tstring jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::to_string
inlinenoexcept

Friends And Related Function Documentation

◆ operator<<

template<class V , class LkT >
tostream& __fastcall operator<< ( tostream os,
shared_ptr< V, LkT > const &  ptr 
)
friend
Todo:
Implement using the advice given in "Standard C++ IOStreams and Locales" by A.Langer & K.Kreft, page 170.

Definition at line 303 of file shared_ptr.hpp.

◆ shared_ptr

template<class V , class LkT >
template<class , class >
friend class shared_ptr
friend

Definition at line 309 of file shared_ptr.hpp.

Member Data Documentation

◆ memory_access_mode

template<class V , class LkT >
constexpr ppd::generic_traits::memory_access_modes jmmcg::LIBJMMCG_VER_NAMESPACE::shared_ptr< V, LkT >::memory_access_mode
staticconstexpr
Initial value:

To assist in allowing compile-time computation of the algorithmic order of the threading model.

Definition at line 162 of file shared_ptr.hpp.


The documentation for this class was generated from the following files: