aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/cmake-cxx11/Modules/CheckCXX11Features/cxx11-test-auto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/cmake-cxx11/Modules/CheckCXX11Features/cxx11-test-auto.cpp')
-rw-r--r--cmake/cmake-cxx11/Modules/CheckCXX11Features/cxx11-test-auto.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmake/cmake-cxx11/Modules/CheckCXX11Features/cxx11-test-auto.cpp b/cmake/cmake-cxx11/Modules/CheckCXX11Features/cxx11-test-auto.cpp
new file mode 100644
index 00000000..948648e9
--- /dev/null
+++ b/cmake/cmake-cxx11/Modules/CheckCXX11Features/cxx11-test-auto.cpp
@@ -0,0 +1,12 @@
+
+int main()
+{
+ auto i = 5;
+ auto f = 3.14159f;
+ auto d = 3.14159;
+ bool ret = (
+ (sizeof(f) < sizeof(d)) &&
+ (sizeof(i) == sizeof(int))
+ );
+ return ret ? 0 : 1;
+}