mirror of
https://github.com/Kitware/CMake.git
synced 2025-06-15 16:39:26 +08:00

When testing compiler modes higher than C++11 for constructs we need, include a check for using `unique_ptr` in that mode. The PGI 18.4 compiler in some environments supports `unique_ptr` in C++11 mode but is broken for C++14 and C++17. Check that `unique_ptr` works in these modes before using one.
10 lines
128 B
C++
10 lines
128 B
C++
#include <cstdio>
|
|
#include <memory>
|
|
#include <unordered_map>
|
|
|
|
int main()
|
|
{
|
|
std::unique_ptr<int> u(new int(0));
|
|
return *u;
|
|
}
|