fork download
  1. #include <iostream>
  2.  
  3. template <typename T>
  4. struct big_int
  5. {
  6. T value;
  7. };
  8.  
  9. template <typename T>
  10. struct small_int
  11. {
  12. T value;
  13. };
  14.  
  15. typedef big_int<long> bigInt;
  16. typedef small_int<char> smallInt;
  17.  
  18. class Problematic
  19. {
  20. public:
  21. Problematic(bigInt) {}
  22. Problematic(smallInt) {}
  23. };
  24.  
  25. int main()
  26. {
  27. std::cout << sizeof(bigInt) << "\n";
  28. std::cout << sizeof(smallInt) << "\n";
  29. }
  30.  
Success #stdin #stdout 0s 2684KB
stdin
Standard input is empty
stdout
4
1