Hello,
Renaming _field from the structure definition works, but not from within the return statement.
Regards.
namespace test_1
{
struct s
{
int _field;
};
class c
{
std::map<int, s> m;
int f(int p)
{
const auto& i = m.find(p);
return i == m.end() ? 0 : i->second._field;
}
};
}