diff options
author | Alec Thomas <alec@swapoff.org> | 2012-10-18 13:21:06 -0400 |
---|---|---|
committer | Alec Thomas <alec@swapoff.org> | 2012-10-18 13:21:06 -0400 |
commit | 92dc19d8a0eaea4aac6327490695420deb226218 (patch) | |
tree | 03d16ac15fb4acf9704a347df639de0a76152f2f /c++11/c++11-test-auto-N2546.cpp | |
parent | d6c7bd8997458658dc4853c36c982acd92966875 (diff) |
Add C++11 feature checking to cmake.
Diffstat (limited to 'c++11/c++11-test-auto-N2546.cpp')
-rw-r--r-- | c++11/c++11-test-auto-N2546.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/c++11/c++11-test-auto-N2546.cpp b/c++11/c++11-test-auto-N2546.cpp new file mode 100644 index 0000000..dbff414 --- /dev/null +++ b/c++11/c++11-test-auto-N2546.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;
+}
|