Have example C++ program check for -std=c++11

This commit is contained in:
Nigel Tao committed 2020-04-03 22:25:21 +11:00
1 parent 2db88dd98e
commit 721190afff
3 files changed
+12

No files matched your search

+4
View File
@@ -94,6 +94,10 @@ $CXX jsonptr.cc && ./a.out < ../../test/data/github-tags.json; rm -f a.out
for a C++ compiler $CXX, such as clang++ or g++.
*/
#if defined(__cplusplus) && (__cplusplus < 201103L)
#error "This C++ program requires -std=c++11 or later"
#endif
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>