fork download
  1. template<class T>
  2. struct decompose;
  3.  
  4. template<class Func, class... Args>
  5. struct decompose<Func(Args...)>
  6. {
  7. constexpr static int n = sizeof...(Args);
  8. };
  9.  
  10. template<class T>
  11. int deduce(T&& t)
  12. {
  13. return decompose<T()>::n;
  14. }
  15.  
  16. int main()
  17. {
  18. deduce([](){});
  19. }
Success #stdin #stdout 0s 3336KB
stdin
Standard input is empty
stdout
Standard output is empty