Launchpad has imported 1 comments from the remote bug at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62155.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2014-08-15T10:00:28+00:00 Doko-v wrote:

works on the trunk, fails on the 4.8 and 4.9 branches:

$ cat test.cc 
template <typename T> struct S {
  T i{[this] {}};
};

S<int> s;

$ /usr/lib/gcc-snapshot/bin/g++ -std=c++11 -c test.cc
test.cc:5:8: error: cannot convert '<brace-enclosed initializer list>' to 'int' 
in initialization
 S<int> s;
        ^
test.cc: In constructor 'constexpr S<int>::S()':
test.cc:1:30: error: cannot convert '<brace-enclosed initializer list>' to 
'int' in initialization
 template <typename T> struct S {
                              ^
test.cc: At global scope:
test.cc:5:8: note: synthesized method 'constexpr S<int>::S()' first required 
here 
 S<int> s;
        ^

$ g++ -std=c++11 -c test.cc 
test.cc: In instantiation of 'struct S<int>::<lambda()>':
test.cc:1:30:   required from here
test.cc:2:8: internal compiler error: in tsubst_copy, at cp/pt.c:12544
   T i{[this] {}};
        ^
Please submit a full bug report,
with preprocessed source if appropriate.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.8/+bug/1338254/comments/3


** Changed in: gcc
       Status: Unknown => New

** Changed in: gcc
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1338254

Title:
  internal error on lambda as argument

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1338254/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to