You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test-NULL-type.cpp 361B

123456789101112131415
  1. #include "type_name.h"
  2. #include <memory>
  3. #include <utility>
  4. #include <iostream>
  5. int main() {
  6. auto o = NULL;
  7. int* n(reinterpret_cast<int*>(o));
  8. // auto n = std::make_pair(0, (intptr_t) NULL);
  9. std::cout << "decltype(n) is " << TYPE_NAME(n) << '\n';
  10. auto p = std::make_pair(std::ref(o), nullptr);
  11. std::cout << "decltype(p) is " << TYPE_NAME(p) << '\n';
  12. }