#include <list>



struct nil;


//slot template and specialization:
template <class T_arg1, class T_arg2>
class slot
{
};

template <class T_arg1>
class slot <T_arg1, nil>
{
};



template <class T_arg1, class T_accumulator>
class someclass
{
public:
  typedef slot<T_arg1, nil> slot_type; //CC 5.7 says "Error: Too many arguments for template slot<void, nil>"
};


//signal template, and specialization;
template <class T_arg1,class T_arg2>
class signal
{


};

template <class T_arg1>
class signal <T_arg1, nil>
{
public:

  template <class T_accumulator>
  class accumulated
    : public someclass<T_arg1, T_accumulator>
  {
    //This does not trigger the bug, though deriving from someclass does.
    //typedef someclass<T_arg1, T_accumulator> some_type;
  };

  signal() {}
};






int main()
{
  signal<void, nil> signal_print;


  return 0;
}
