This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/55159] pythy constexpr auto lambda pointer has no initializer


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]