Fix IVariant -Wdeprecated-copy-with-dtor

Since C++11 the generation of implicit copy constructor is deprecated if
the type has a user-defined constructor or destructor (even if defaulted).
Same thing for the implicit copy assignment operator.

Fix this by adding a defaulted copy-constructor for IVariant that remove
the implicit default constructor, so add it too.
This commit is contained in:
Corentin Wallez 2021-06-21 13:18:21 +02:00
parent 2e1b5fb39e
commit 6a85c695cc

View File

@ -417,6 +417,11 @@ struct IVariant
virtual ~IVariant() = default;
virtual IVariant *clone(ObjectPoolBase *pool) = 0;
ID self = 0;
protected:
IVariant() = default;
IVariant(const IVariant&) = default;
IVariant &operator=(const IVariant&) = default;
};
#define SPIRV_CROSS_DECLARE_CLONE(T) \