wxRect doesnot have a copy constructor
-
- In need of some credit
- Posts: 3
- Joined: Mon May 06, 2019 8:48 am
wxRect doesnot have a copy constructor
Well, is it ok?
Re: wxRect doesnot have a copy constructor
Why should it have? wxRect only consists of 4 integers, the compiler knows everything he needs to know to copy this structure.
Use the source, Luke!
Re: wxRect doesnot have a copy constructor
ubuntu 20.04, wxWidgets 3.2.1
-
- In need of some credit
- Posts: 3
- Joined: Mon May 06, 2019 8:48 am
Re: wxRect doesnot have a copy constructor
Very useful information. for someone does not think that not providing copy constructor will not confuse programmer.
the information is for people who program compiler, Isn't it?
the information is for people who program compiler, Isn't it?
Re: wxRect doesnot have a copy constructor
if you have not provided a copy constructor then you assume that default copy ctor works well. and byte-to-byte copy is what you need.
else you must write explicit trivial copy ctor, and invoke memcpy(...), or field to field copy, inside it.
is it good for programmer?
else you must write explicit trivial copy ctor, and invoke memcpy(...), or field to field copy, inside it.
is it good for programmer?
ubuntu 20.04, wxWidgets 3.2.1
-
- In need of some credit
- Posts: 3
- Joined: Mon May 06, 2019 8:48 am
Re: wxRect doesnot have a copy constructor
fair and I agree