If I have a free function:
enum BOM { utf8, utf16le };
size_t length(BOM b);
And then I have a class with a member named length:
struct foo {
BOM m_bom;
size_t length() { return length(m_bom); }
};
Why does the use of length(m_bom) fail to find the free function using type dependent lookup?
I'm using VS2015, but I suspect that they've got these rules right by now, so the question is probably a language question...