cxx-benchmarks/test-NULL-type.cpp

16 lines
361 B
C++
Raw Permalink Normal View History

2014-07-19 13:35:25 +00:00
#include "type_name.h"
#include <memory>
#include <utility>
#include <iostream>
int main() {
auto o = NULL;
int* n(reinterpret_cast<int*>(o));
// auto n = std::make_pair(0, (intptr_t) NULL);
std::cout << "decltype(n) is " << TYPE_NAME(n) << '\n';
auto p = std::make_pair(std::ref(o), nullptr);
std::cout << "decltype(p) is " << TYPE_NAME(p) << '\n';
}