public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42266]  New: [C++0x] ICE with decltype and variadic templates
@ 2009-12-03 18:12 paolo dot carlini at oracle dot com
  2009-12-03 22:10 ` [Bug c++/42266] " jason at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-03 18:12 UTC (permalink / raw)
  To: gcc-bugs

I tried to reduce as much as possible (maybe too much, we'll see...) an issue
which is blocking our work on std::bind. Note, the problem disappears if I
simplify the testcase further to not use variadic templates while keeping the
rest unchanged.

Jason, can you help us?

//////////////////

template<typename... _Elements>
  class tuple;

template<typename _Arg>
  class _Mu;

template<typename _Signature>
  struct _Bind;

template<typename _Functor, typename... _Bound_args>
  class _Bind<_Functor(_Bound_args...)>
  {
    template<typename... _Args, typename
             = decltype(_Functor()(_Mu<_Bound_args>()(_Bound_args(),
                                                      tuple<_Args...>())...) )>
      void __call() { }
  };

template<typename _Functor, typename _Arg>
  _Bind<_Functor(_Arg)>
  bind(_Functor, _Arg) { }

struct State
{
  bool ready() { return true; }

  void f()
  {
    bind(&State::ready, this);
  }
};


-- 
           Summary: [C++0x] ICE with decltype and variadic templates
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: paolo dot carlini at oracle dot com


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


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

end of thread, other threads:[~2009-12-04 16:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-03 18:12 [Bug c++/42266] New: [C++0x] ICE with decltype and variadic templates paolo dot carlini at oracle dot com
2009-12-03 22:10 ` [Bug c++/42266] " jason at gcc dot gnu dot org
2009-12-04  0:26 ` jason at gcc dot gnu dot org
2009-12-04  8:51 ` paolo dot carlini at oracle dot com
2009-12-04 16:40 ` jason at gcc dot gnu dot 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).