fork download
  1. #include <iostream>
  2. #include <type_traits>
  3.  
  4. template<class T>
  5. void wiegross(T t) {
  6. std::cout << sizeof(t) << std::endl;
  7. }
  8.  
  9. int main() {
  10. int a = 23;
  11. double b = 42;
  12. int* c = &a;
  13. int d = 4;
  14. int e = 5;
  15. wiegross([&]{return a*b+*c;});
  16. wiegross([&]{return a*b+*c+d+e;});
  17. }
  18.  
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
12
20