http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55159

--- Comment #3 from Daniel Krügler <daniel.kruegler at googlemail dot com> 
2012-11-01 15:11:51 UTC ---
(In reply to comment #2)
Hmmh, it doesn't look like that one, maybe I was wrong about an existing issue.

But it seems that gcc doesn't ignore the const (in "const T*" or "const auto*")
for functions here, which seems to be the root of the second problem (This is
*not* attempting to form a function with cv-qualifier-seq). Both

template <typename T>
T* addr(T& t) { return &t; }

bool less(int x, int y) { return x < y ? x : y; }

static auto* f = addr(less);

and

template <typename T>
T* addr(T& t) { return &t; }

bool less(int x, int y) { return x < y ? x : y; }

template<typename T>
int deduce(T*) { return 0; }

int i = deduce(addr(less));

are accepted as they should.

Reply via email to