summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2021-03-10 17:51:45 (GMT)
committerGitHub <noreply@github.com>2021-03-10 17:51:45 (GMT)
commit20c452fe5c0955a81ae1222d846632f1525f08f4 (patch)
tree79ebdf43a51b3283625742e02614f1c3f15fc3b6 /c++
parentc41a1cb2094ae0cc5fb40671181ce4e9f73ba9dc (diff)
downloadhdf5-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++')
-rw-r--r--c++/examples/chunks.cpp4
-rw-r--r--c++/examples/compound.cpp4
-rw-r--r--c++/examples/create.cpp4
-rw-r--r--c++/examples/extend_ds.cpp4
-rw-r--r--c++/examples/h5group.cpp4
-rw-r--r--c++/examples/readdata.cpp4
-rw-r--r--c++/examples/testh5c++.sh.in36
-rw-r--r--c++/examples/writedata.cpp4
-rw-r--r--c++/src/H5Attribute.cpp4
-rw-r--r--c++/src/H5DataSet.cpp4
-rw-r--r--c++/src/H5DataSpace.cpp4
-rw-r--r--c++/src/H5DataType.cpp4
-rw-r--r--c++/src/H5Exception.h4
-rw-r--r--c++/src/H5FaccProp.cpp4
-rw-r--r--c++/src/H5File.cpp4
-rw-r--r--c++/src/H5Group.cpp4
-rw-r--r--c++/src/H5Include.h13
-rw-r--r--c++/src/H5PropList.cpp4
-rw-r--r--c++/test/dsets.cpp4
-rw-r--r--c++/test/h5cpputil.cpp4
-rw-r--r--c++/test/tarray.cpp4
-rw-r--r--c++/test/tattr.cpp4
-rw-r--r--c++/test/tcompound.cpp4
-rw-r--r--c++/test/tdspl.cpp4
-rw-r--r--c++/test/testhdf5.cpp4
-rw-r--r--c++/test/tfile.cpp4
-rw-r--r--c++/test/tfilter.cpp4
-rw-r--r--c++/test/th5s.cpp4
-rw-r--r--c++/test/titerate.cpp4
-rw-r--r--c++/test/tlinks.cpp4
-rw-r--r--c++/test/tobject.cpp4
-rw-r--r--c++/test/trefer.cpp4
-rw-r--r--c++/test/ttypes.cpp4
-rw-r--r--c++/test/tvlstr.cpp4
34 files changed, 6 insertions, 171 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;
diff --git a/c++/src/H5Attribute.cpp b/c++/src/H5Attribute.cpp
index 81e656f..d893fec 100644
--- a/c++/src/H5Attribute.cpp
+++ b/c++/src/H5Attribute.cpp
@@ -11,11 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include <string>
#include "H5private.h" // for HDfree
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp
index 9027d79..5dc44b8 100644
--- a/c++/src/H5DataSet.cpp
+++ b/c++/src/H5DataSet.cpp
@@ -11,11 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include <string>
#include "H5private.h" // for HDfree
diff --git a/c++/src/H5DataSpace.cpp b/c++/src/H5DataSpace.cpp
index 9c997d1..0485530 100644
--- a/c++/src/H5DataSpace.cpp
+++ b/c++/src/H5DataSpace.cpp
@@ -11,11 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include <string>
#include "H5Include.h"
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index a943a55..1689912 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -11,11 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include <string>
#include "H5Include.h"
diff --git a/c++/src/H5Exception.h b/c++/src/H5Exception.h
index 566c818..18974fc 100644
--- a/c++/src/H5Exception.h
+++ b/c++/src/H5Exception.h
@@ -18,11 +18,7 @@
#include <string>
namespace H5 {
-#ifdef H5_NO_STD
-#define H5std_string ::string
-#else
#define H5std_string std::string
-#endif
/*! \class Exception
\brief Exception provides wrappers of HDF5 error handling functions.
diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp
index c8c2b24..8166d05 100644
--- a/c++/src/H5FaccProp.cpp
+++ b/c++/src/H5FaccProp.cpp
@@ -11,11 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include <string>
using std::cerr;
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index cdc9b45..bbdcd6b 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -11,11 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include <string>
#include "H5Include.h"
diff --git a/c++/src/H5Group.cpp b/c++/src/H5Group.cpp
index 392f31a..2fc6899 100644
--- a/c++/src/H5Group.cpp
+++ b/c++/src/H5Group.cpp
@@ -11,11 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include <string>
#include "H5Include.h"
diff --git a/c++/src/H5Include.h b/c++/src/H5Include.h
index 1f03150..e662d90 100644
--- a/c++/src/H5Include.h
+++ b/c++/src/H5Include.h
@@ -14,19 +14,6 @@
#include <hdf5.h>
-// Define bool type for platforms that don't support bool yet
-#ifdef BOOL_NOTDEFINED
-#ifdef false
-#undef false
-#endif
-#ifdef true
-#undef true
-#endif
-typedef int bool;
-const bool false = 0;
-const bool true = 1;
-#endif
-
// These are defined in H5Opkg.h, which should not be included in the C++ API,
// so re-define them here for now.
diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp
index 3780220..c4eda5e 100644
--- a/c++/src/H5PropList.cpp
+++ b/c++/src/H5PropList.cpp
@@ -11,11 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include <string>
diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp
index 03e4927..93c266f 100644
--- a/c++/test/dsets.cpp
+++ b/c++/test/dsets.cpp
@@ -23,11 +23,7 @@
***************************************************************************/
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
using std::cerr;
using std::endl;
diff --git a/c++/test/h5cpputil.cpp b/c++/test/h5cpputil.cpp
index e38b34a..d42fc8c 100644
--- a/c++/test/h5cpputil.cpp
+++ b/c++/test/h5cpputil.cpp
@@ -19,11 +19,7 @@
***************************************************************************/
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
using std::cerr;
using std::endl;
diff --git a/c++/test/tarray.cpp b/c++/test/tarray.cpp
index ab66174..7525c5f 100644
--- a/c++/test/tarray.cpp
+++ b/c++/test/tarray.cpp
@@ -16,11 +16,7 @@
tarray.cpp - HDF5 C++ testing the array datatype functionality
***************************************************************************/
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
using std::cerr;
using std::endl;
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp
index 047d360..e659e8e 100644
--- a/c++/test/tattr.cpp
+++ b/c++/test/tattr.cpp
@@ -17,11 +17,7 @@
C attribute interface (H5A)
***************************************************************************/
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
using std::cerr;
using std::endl;
diff --git a/c++/test/tcompound.cpp b/c++/test/tcompound.cpp
index 641002e..4c5e3e0 100644
--- a/c++/test/tcompound.cpp
+++ b/c++/test/tcompound.cpp
@@ -16,11 +16,7 @@
tcompound.cpp - HDF5 C++ testing the compound data type functionality
***************************************************************************/
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
using std::cerr;
using std::endl;
diff --git a/c++/test/tdspl.cpp b/c++/test/tdspl.cpp
index fc73a6a..257233e 100644
--- a/c++/test/tdspl.cpp
+++ b/c++/test/tdspl.cpp
@@ -17,11 +17,7 @@
list functionality
***************************************************************************/
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
using std::cerr;
using std::endl;
diff --git a/c++/test/testhdf5.cpp b/c++/test/testhdf5.cpp
index da5e2a4..71428ce 100644
--- a/c++/test/testhdf5.cpp
+++ b/c++/test/testhdf5.cpp
@@ -38,11 +38,7 @@
GetTestNumErrs() -- Retrieve the number of testing errors
***************************************************************************/
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
using std::cerr;
using std::endl;
diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp
index b082f0a..5e4e91b 100644
--- a/c++/test/tfile.cpp
+++ b/c++/test/tfile.cpp
@@ -20,11 +20,7 @@
h5_fileaccess() -- in h5test.c, returns a file access template
***************************************************************************/
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
using std::cerr;
using std::endl;
diff --git a/c++/test/tfilter.cpp b/c++/test/tfilter.cpp
index 2df88b2..e89838c 100644
--- a/c++/test/tfilter.cpp
+++ b/c++/test/tfilter.cpp
@@ -16,11 +16,7 @@
tfilter.cpp - HDF5 C++ testing various filters and their combination.
***************************************************************************/
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
using std::cerr;
using std::endl;
diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp
index e57ac04..a005170 100644
--- a/c++/test/th5s.cpp
+++ b/c++/test/th5s.cpp
@@ -19,11 +19,7 @@
EXTERNAL ROUTINES/VARIABLES:
***************************************************************************/
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
using std::cerr;
using std::endl;
diff --git a/c++/test/titerate.cpp b/c++/test/titerate.cpp
index 1fb2f57..17620ca 100644
--- a/c++/test/titerate.cpp
+++ b/c++/test/titerate.cpp
@@ -16,11 +16,7 @@
titerate.cpp - HDF5 C++ testing iterate related functionality
***************************************************************************/
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
using std::cerr;
using std::endl;
diff --git a/c++/test/tlinks.cpp b/c++/test/tlinks.cpp
index 231bff2..22e69da 100644
--- a/c++/test/tlinks.cpp
+++ b/c++/test/tlinks.cpp
@@ -16,11 +16,7 @@
C link interface (H5L)
***************************************************************************/
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
using std::cerr;
using std::endl;
diff --git a/c++/test/tobject.cpp b/c++/test/tobject.cpp
index 87abd43..5892f39 100644
--- a/c++/test/tobject.cpp
+++ b/c++/test/tobject.cpp
@@ -16,11 +16,7 @@
tobject.cpp - HDF5 C++ testing object related functionality
***************************************************************************/
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
#include <string>
#include "H5Cpp.h" // C++ API header file
diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp
index 5ec04cd..939b0ee 100644
--- a/c++/test/trefer.cpp
+++ b/c++/test/trefer.cpp
@@ -17,11 +17,7 @@
Reference interface (H5R)
***************************************************************************/
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
using std::cerr;
using std::endl;
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp
index cf32b2b..5fc82a5 100644
--- a/c++/test/ttypes.cpp
+++ b/c++/test/ttypes.cpp
@@ -16,11 +16,7 @@
ttypes.cpp - HDF5 C++ testing the general datatype functionality
***************************************************************************/
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
using std::cerr;
using std::endl;
diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp
index 5d671d1..780d1b9 100644
--- a/c++/test/tvlstr.cpp
+++ b/c++/test/tvlstr.cpp
@@ -18,11 +18,7 @@
EXTERNAL ROUTINES/VARIABLES:
***************************************************************************/
-#ifdef OLD_HEADER_FILENAME
-#include <iostream.h>
-#else
#include <iostream>
-#endif
using std::cerr;
using std::endl;