Something went wrong. Try again.
A Tour of C++ for experienced programmers, as if C++26 is the only version that ever existed.
Something went wrong. Try again.
123456789101112131415161718#include <type_traits>#include <iostream>
template <typename T>void show() { if constexpr (std::is_pointer_v<T>) { std::cout << "pointer" << '\n'; } else { std::cout << "primary" << '\n'; }}
int main() { show<int*>(); show<int>(); return 0;}