CMake/Source/Checks/cm_cxx14_check.cpp
Brad King 3a2c736b41 Extend C++17/C++14 feature checks to require unique_ptr
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.
2018-08-01 14:03:43 -04:00

9 lines
103 B
C++

#include <cstdio>
#include <memory>
int main()
{
std::unique_ptr<int> u(new int(0));
return *u;
}