Closed dermont123 closed 7 years ago
Thanks. I added a small test to the hot fix/v1.8.6 branch, which reproduces the problem, based on your code. I will investigate this.
I am making good progress. Took me some time, but I was able to write a simplified test that shows an equivalent problem.
The situation in too sstream
complicated. I do not know the internals of that code, there are a lot of declarations in there, so it is difficult to debug.
In fact, it is quite easy to end up in that the infinite recursion state with a hierarchy of 3 classes, and some pointers holding references to one of the other classes.
I will work on a fix now. I probably just need to keep a list of the classes that have already been visited, and prevent them to be visited again. I'll work on this tomorrow though, writing the test and debugging the code already took me forever. But it is an interesting problem. Weird nobody ever stumbled over this before, because it is not an unlikely scenario.
I pushed a fix to the hotfix/v1.8.6
branch. Could you test this please?
Thanks, it fixed the recursion issue for me.
Cool. I will publish the 1.8.6 release with the fix during the weekend.
Hi, I found the problem I had with the recursive loop in find_noncopyable_vars. It appears to happen for a class with a stream variable(std::istream*) and when base classes are known for ostream in class_declaration.hierarchy_info_t in is_noncopyable().
I think ::std::basic_ostream processes it base class std::basic_ios which holds a pointer to ostream and so on.
Stream.zip