fork download
  1. #include<utility>
  2.  
  3. void Third (int&& a)
  4. {}
  5.  
  6. template<typename... intrgs>
  7. void Second (intrgs&&... args)
  8. {
  9. Third(args...);
  10. }
  11.  
  12. void First (int&& a)
  13. {
  14. Second(std::move(a));
  15. Third(std::move(a));
  16. }
  17.  
  18. int main ()
  19. {
  20. First(0);
  21. }
  22.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In instantiation of 'void Second(intrgs&& ...) [with intrgs = {int}]':
prog.cpp:14:22:   required from here
prog.cpp:9:8: error: cannot bind 'int' lvalue to 'int&&'
   Third(args...);
        ^
prog.cpp:3:6: note:   initializing argument 1 of 'void Third(int&&)'
 void Third (int&& a)
      ^
stdout
Standard output is empty