This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/55710] [C++11] Linkage errors with lambdas
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 15 Dec 2012 19:55:56 +0000
- Subject: [Bug c++/55710] [C++11] Linkage errors with lambdas
- Auto-submitted: auto-generated
- References: <bug-55710-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55710
--- Comment #6 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> 2012-12-15 19:55:56 UTC ---
(In reply to comment #5)
So will the following do that:
//----------------
template <class T>
struct X {
static void (*code) ();
};
template <class T>
void (*X<T>::code) () = []{}; // Line 7
int main () {
X<int>::code();
}
//----------------
giving me
"In function `X<int>::code::{lambda()#1}::operator void (*)()() const':|
|7|undefined reference to `X<int>::code::{lambda()#1}::_FUN()'|
"
?