2 ms·
> and returns me a completely filled in object of type T What if type T contains a pointer to type U ? Or a list of pointers to a type U, with some duplicates
by maccard 10y ago
> and returns me a completely filled in object of type T
What if type T contains a pointer to type U ? Or a list of pointers to a type U, with some duplicates in the list? What if T contains a floating point number, and the application is compiled with ffast-math?
What if the object contains a reference to some unknown type (a file, or socket)?
There are lots of ways of solving these problems, but each of the solutions has trade offs which may be acceptable to you, but aren't acceptable to me and vice versa.