On Wed, 3 Apr 2013, Derek Gaston wrote:

I can't see how the container is not created yet... that would be a
segfault when you try to push_back on it....  

No, that would be undefined behavior when you try to push_back on it.
"undefined behavior" only means a segfault when it ends up hitting
memory outside the process' current address space.

not too mention that the code that actually does the pushing back is
in Singleton.C which is where the container is... so it would have
had to have been created by the time you call that function...

Doesn't matter.

What C++ is doing under the hood is:

Construct A
Construct B

except in random order (which is why stuff worked fine for Ben), not
alphabetical order.

And if A's constructor calls a function dealing with B, there's
neither compile-time nor run-time analysis done to detect that and say
"whoops, let's construct B before A".
---
Roy
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to