I have a struct that have some member and a Object that have private copy constructor, How can I create an array that include this object. For example: I have an Object:
class Image
{
...
private:
Image(const Image&);
Image& operator=(const Image&);
u8* pixel;
int width;
int height
}
struct ImageInformation
{
Image image;
int resolution;
}
I want to create an array for ImageInformation : vector but this is forbidding
You'll have to define the
move ctorandmove assignment operatoron theImageclasssince the default implementations would be deleted because you provided a user declaredcopy ctorandcopy assignment operator.You should then be able to use the
vectorwith no issue.