diff --git a/src/MemoryX.h b/src/MemoryX.h index c9922d210..78b73dbd5 100644 --- a/src/MemoryX.h +++ b/src/MemoryX.h @@ -485,15 +485,21 @@ static char*THIS_FILE = __FILE__; // to shared_ptr if we can't (because containers know how to copy elements only, // not move them). #ifdef __AUDACITY_OLD_STD__ - template using movable_ptr = std::shared_ptr; -#define make_movable std::make_shared - #else - template using movable_ptr = std::unique_ptr; -#define make_movable std::make_unique - #endif +template +inline movable_ptr make_movable(Args&&... args) +{ + return std:: +#ifdef __AUDACITY_OLD_STD__ + make_shared +#else + make_unique +#endif + (std::forward(args)...); +} + #endif // __AUDACITY_MEMORY_X_H__