Files
lmms/include/stdshims.h
Johannes Lorenz eebdc0f4be Linked model groups (#4964)
Add labeled controls for different types with a common base class

Implement a container for multiple equal groups of linked models and
suiting views. Such groups are suited for representing mono effects where each
Model occurs twice. A group provides Models for one mono processor and is
visually represented with a group box.

This concept is common for LADSPA and Lv2, and useful for any mono effect.
2020-02-21 19:26:29 +01:00

35 lines
882 B
C++

//! Shims for std:: functions that aren't available in the current C++ versions
//! we target.
#ifndef STDSHIMS_H
#define STDSHIMS_H
#include <memory>
#include <utility>
#if (__cplusplus >= 201402L || _MSC_VER)
#ifndef _MSC_VER
#warning "This file should now be removed! The functions it provides are part of the C++14 standard."
#endif
using std::make_unique;
#else
/// Shim for http://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique
template<typename T, typename... Args>
std::unique_ptr<T> make_unique(Args&&... args)
{
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}
//! Overload for the case a deleter should be specified
template<typename T, typename Deleter, typename... Args>
std::unique_ptr<T, Deleter> make_unique(Args&&... args)
{
return std::unique_ptr<T, Deleter>(new T(std::forward<Args>(args)...));
}
#endif
#endif // include guard