fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Foo
  5. {
  6. public:
  7. Foo() = default;
  8. //Foo() {}
  9. template<class... T>
  10. Foo(T&&... args) : a(123)
  11. {
  12. cout << "why not enter?" << endl;
  13. }
  14. int a;
  15. };
  16. int main() {
  17. int b = 5;
  18. Foo f = Foo(1, b);
  19. return 0;
  20. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
why not enter?