The following code was compiled with g++ using the flags -O0 -g3 (no optimization and request additional debug information respectively)
#include <bits/stdc++.h>
using namespace std;
void foo(unordered_set<int> b)
{
if (b.size()>0)
cout<<*b.begin()<<endl;
}
int main(void)
{
unordered_set<int> c={1};
foo(c);
}
I am single stepping using Eclipse IDE for C/C++ , Oxygen.1a Release.
When I try to single step into foo() the debugger begins displaying the many lines of the C++ Standard Library unordered_set copy constructor code. If I step out of the copy constructor code this results in foo() also being stepped over.
I could set a breakpoint in foo, or run to a line in foo, but this is inconvenient. Is there a simpler way to avoid single stepping thru the copy constructor code and directly into foo()?