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