I just spent 3 hours, maybe more, trying to find an error, segfault or bad_allow, depending on how I modified the code to understand which object was messing with glass or memory: I put all my objects in doubt ... I killed the classes ... (however, it turned out to be good, because in the end these classes turned out to be useless :-)) ...
But, really, the real mistake was simple: I did not write a return statement in a function that should return a value (in my case, I needed to return std::vector<boost::any> ).
I thought gcc (4.6.3) could not be compiled without it. And I feel even stranger remembering that something similar happened to me with ms visual 2010 .
So now I am wondering if it is legal to write a return statement? What happens in such cases?
Is this due to the fact that the main function, which can have a return value or not? Or should I consider switching to gcc 4.7 ?
source share