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 297 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 300 of file MemoryX.h.

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

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: