public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58820] New: lambda multiple inheritance operator() not ambiguous
@ 2013-10-21  7:36 sutambe at yahoo dot com
  2013-10-21 12:18 ` [Bug c++/58820] " daniel.kruegler at googlemail dot com
  2021-08-27 20:47 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: sutambe at yahoo dot com @ 2013-10-21  7:36 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58820
           Summary: lambda multiple inheritance operator() not ambiguous
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sutambe at yahoo dot com

The following lambda overloads are not ambiguous but they are reported as such.

template <class... Fs> 
struct overload_set : Fs...
{
  overload_set(Fs... f)
    : Fs(f)...
  {}  
};

template <class... Fs> 
overload_set<Fs...> overload(Fs... x)
{
  return overload_set<Fs...>(x...);
}

int main(void)
{
  double d = 10; 
  overload(
      [](int i)  { },
      [](double d)  { },
      [](char c) { } 
    )(d);
}


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-27 20:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-21  7:36 [Bug c++/58820] New: lambda multiple inheritance operator() not ambiguous sutambe at yahoo dot com
2013-10-21 12:18 ` [Bug c++/58820] " daniel.kruegler at googlemail dot com
2021-08-27 20:47 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).