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++/61135] It seems to be not able to call virtual method of literal object in lambda expression


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

Daniel KrÃgler <daniel.kruegler at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.kruegler@googlemail.
                   |                            |com

--- Comment #3 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> ---
1) The problem also exists in gcc 4.10 trunk

2) As written, the presented code would be ill-formed anyway. The following
transformed example presents valid code that produces the same ICE:

//-----------------------
struct Base
{
  virtual int b() const{return 1;};
};

struct Super:Base{};

int main()
{
  constexpr Super s = Super();
  [&]{s.b();}();
}
//-----------------------

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