Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enable c++11 compilation and check for c++11 support
added GCC option to enable c++11 support added try compile statement to check for c++11 support with small test program for checking null pointer and new initializers removed the obtaining of GCC version (no longer being used)
- Loading branch information
1 parent
7cbabf6
commit 18ed38e
Showing
2 changed files
with
41 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include <iostream> | ||
|
||
int main() | ||
{ | ||
// test initializers | ||
int i {1}; | ||
double d {2.0}; | ||
|
||
// test initializer list | ||
int a[] {1, 2, 3, 4}; | ||
|
||
// test nullptr | ||
int *pi {nullptr}; | ||
|
||
pi = &i; | ||
|
||
std::cout << d << a[1] << *pi << std::endl; | ||
} |