Why doesn't ADL find function templates?
Posted
by Huw Giddens
on Stack Overflow
See other posts from Stack Overflow
or by Huw Giddens
Published on 2010-06-01T22:00:04Z
Indexed on
2010/06/01
22:03 UTC
Read the original article
Hit count: 374
What part of the C++ specification restricts argument dependent lookup from finding function templates in the set of associated namespaces? In other words, why won't the following compile?
namespace ns {
struct foo {};
template<int i> void frob(foo const&) {}
}
int main() {
ns::foo f;
frob<0>(f);
}
© Stack Overflow or respective owner