Audacity 3.2.0
Static Public Member Functions | List of all members
SharedNonInterfering< T > Struct Template Reference

Workaround for std::make_shared not working on macOs with over-alignment. More...

#include <MemoryX.h>

Inheritance diagram for SharedNonInterfering< T >:
[legend]
Collaboration diagram for SharedNonInterfering< T >:
[legend]

Static Public Member Functions

template<typename... Args>
static std::shared_ptr< T > make_shared (Args &&...args)
 

Detailed Description

template<typename T>
struct SharedNonInterfering< T >

Workaround for std::make_shared not working on macOs with over-alignment.

Defines a static member function to use as an alternative to that in std::

Definition at line 294 of file MemoryX.h.

Member Function Documentation

◆ make_shared()

template<typename T >
template<typename... Args>
static std::shared_ptr< T > SharedNonInterfering< T >::make_shared ( Args &&...  args)
inlinestatic

Definition at line 297 of file MemoryX.h.

298 {
299 return std::
300#ifdef __APPLE__
301 // shared_ptr must be constructed from unique_ptr on Mac
302 make_unique
303#else
305#endif
306 <T>(std::forward<Args>(args)...);
307 }
STL namespace.
static std::shared_ptr< T > make_shared(Args &&...args)
Definition: MemoryX.h:297

References SharedNonInterfering< T >::make_shared().

Referenced by SharedNonInterfering< T >::make_shared().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this struct was generated from the following file: