fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template<typename... Args>
  5. class test
  6. {
  7. public:
  8. //void operator ()(const Args&... args) // This doesn't work
  9. void operator ()(const std::remove_reference_t<Args>&... args) // This does :D
  10. {
  11.  
  12. }
  13. };
  14.  
  15. int main()
  16. {
  17. test<int&, bool> w;
  18. w(5,true);
  19.  
  20. // your code goes here
  21. return 0;
  22. }
Success #stdin #stdout 0s 3452KB
stdin
Standard input is empty
stdout
Standard output is empty