diff options
author | Sean McBride <sean@rogue-research.com> | 2021-03-10 17:51:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-10 17:51:45 (GMT) |
commit | 20c452fe5c0955a81ae1222d846632f1525f08f4 (patch) | |
tree | 79ebdf43a51b3283625742e02614f1c3f15fc3b6 /c++/examples | |
parent | c41a1cb2094ae0cc5fb40671181ce4e9f73ba9dc (diff) | |
download | hdf5-20c452fe5c0955a81ae1222d846632f1525f08f4.zip hdf5-20c452fe5c0955a81ae1222d846632f1525f08f4.tar.gz hdf5-20c452fe5c0955a81ae1222d846632f1525f08f4.tar.bz2 |
Removed checks/workarounds for pre-C++89 compatibility (#449)
After 30+ years, just assume that the following exist:
- extension-less includes
- namespaces
- std::
- static_cast
- bool
Diffstat (limited to 'c++/examples')
-rw-r--r-- | c++/examples/chunks.cpp | 4 | ||||
-rw-r--r-- | c++/examples/compound.cpp | 4 | ||||
-rw-r--r-- | c++/examples/create.cpp | 4 | ||||
-rw-r--r-- | c++/examples/extend_ds.cpp | 4 | ||||
-rw-r--r-- | c++/examples/h5group.cpp | 4 | ||||
-rw-r--r-- | c++/examples/readdata.cpp | 4 | ||||
-rw-r--r-- | c++/examples/testh5c++.sh.in | 36 | ||||
-rw-r--r-- | c++/examples/writedata.cpp | 4 |
8 files changed, 6 insertions, 58 deletions
diff --git a/c++/examples/chunks.cpp b/c++/examples/chunks.cpp index 365a7da..3717fcb 100644 --- a/c++/examples/chunks.cpp +++ b/c++/examples/chunks.cpp @@ -16,11 +16,7 @@ * We will read from the file created by extend.cpp */ -#ifdef OLD_HEADER_FILENAME -#include <iostream.h> -#else #include <iostream> -#endif using std::cout; using std::endl; diff --git a/c++/examples/compound.cpp b/c++/examples/compound.cpp index 31a572a..8975845 100644 --- a/c++/examples/compound.cpp +++ b/c++/examples/compound.cpp @@ -17,11 +17,7 @@ * and read back fields' subsets. */ -#ifdef OLD_HEADER_FILENAME -#include <iostream.h> -#else #include <iostream> -#endif using std::cout; using std::endl; diff --git a/c++/examples/create.cpp b/c++/examples/create.cpp index ef2de36..e55230f 100644 --- a/c++/examples/create.cpp +++ b/c++/examples/create.cpp @@ -15,11 +15,7 @@ * This example writes a dataset to a new HDF5 file. */ -#ifdef OLD_HEADER_FILENAME -#include <iostream.h> -#else #include <iostream> -#endif #include <string> #include "H5Cpp.h" diff --git a/c++/examples/extend_ds.cpp b/c++/examples/extend_ds.cpp index e69c1c0..24f5f3e 100644 --- a/c++/examples/extend_ds.cpp +++ b/c++/examples/extend_ds.cpp @@ -18,11 +18,7 @@ * */ -#ifdef OLD_HEADER_FILENAME -#include <iostream.h> -#else #include <iostream> -#endif #include <string> using std::cout; diff --git a/c++/examples/h5group.cpp b/c++/examples/h5group.cpp index 793ff8f..f9ec176 100644 --- a/c++/examples/h5group.cpp +++ b/c++/examples/h5group.cpp @@ -20,11 +20,7 @@ * the C version is used in this example. */ -#ifdef OLD_HEADER_FILENAME -#include <iostream.h> -#else #include <iostream> -#endif using std::cout; using std::endl; diff --git a/c++/examples/readdata.cpp b/c++/examples/readdata.cpp index 7441420..e247a8e 100644 --- a/c++/examples/readdata.cpp +++ b/c++/examples/readdata.cpp @@ -17,11 +17,7 @@ // information about the dataset in the SDS.h5 file is obtained. // -#ifdef OLD_HEADER_FILENAME -#include <iostream.h> -#else #include <iostream> -#endif using std::cout; using std::endl; diff --git a/c++/examples/testh5c++.sh.in b/c++/examples/testh5c++.sh.in index 46fe5eb..44dc9e7 100644 --- a/c++/examples/testh5c++.sh.in +++ b/c++/examples/testh5c++.sh.in @@ -67,11 +67,7 @@ temp_FILES="a.out $applib" cat > $appmain <<EOF #include <string> -#ifdef OLD_HEADER_FILENAME -#include <iostream.h> -#else #include <iostream> -#endif #include "H5Cpp.h" @@ -95,19 +91,11 @@ EOF # generate prog1 cat > $prog1 <<EOF -#ifdef OLD_HEADER_FILENAME - #include <iostream.h> -#else - #include <iostream> -#endif +#include <iostream> #include <string> -#ifndef H5_NO_NAMESPACE -#ifndef H5_NO_STD - using std::cout; - using std::endl; -#endif // H5_NO_STD -#endif +using std::cout; +using std::endl; int sub1(void) { cout << "in sub1" << endl; @@ -117,19 +105,11 @@ EOF # generate prog2 cat > $prog2 <<EOF -#ifdef OLD_HEADER_FILENAME - #include <iostream.h> -#else - #include <iostream> -#endif +#include <iostream> #include <string> -#ifndef H5_NO_NAMESPACE -#ifndef H5_NO_STD - using std::cout; - using std::endl; -#endif // H5_NO_STD -#endif +using std::cout; +using std::endl; int sub2(void) { cout << "in sub2" << endl; @@ -142,11 +122,7 @@ EOF cat > $hdf5main <<EOF #include <string> -#ifdef OLD_HEADER_FILENAME -#include <iostream.h> -#else #include <iostream> -#endif #include "H5Cpp.h" diff --git a/c++/examples/writedata.cpp b/c++/examples/writedata.cpp index ddd3460..f2b715a 100644 --- a/c++/examples/writedata.cpp +++ b/c++/examples/writedata.cpp @@ -20,11 +20,7 @@ * file is closed. Program reopens the file and reads and displays the result. */ -#ifdef OLD_HEADER_FILENAME -#include <iostream.h> -#else #include <iostream> -#endif using std::cout; using std::endl; |