Is there a way to check destruction order constraints of the form "A is destructed before B" at compile time?
Check destruction order constraints at compile time
121 views Asked by h0b0 At
3
There are 3 answers
1
On
You can check that easily by adding commands to the destuctor. See(for example here for more detailed description): http://msdn.microsoft.com/en-us/library/8183zf3x(v=vs.80).aspx
Kind regards, Bo
I don't think that's possible. Take for instance the following code:
How would you know at compile time which destructor is called first?