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 /config | |
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 'config')
-rw-r--r-- | config/cmake_ext_mod/HDFCXXTests.cpp | 56 | ||||
-rw-r--r-- | config/cmake_ext_mod/HDFUseCXX.cmake | 5 |
2 files changed, 0 insertions, 61 deletions
diff --git a/config/cmake_ext_mod/HDFCXXTests.cpp b/config/cmake_ext_mod/HDFCXXTests.cpp index f05151b..08ccb34 100644 --- a/config/cmake_ext_mod/HDFCXXTests.cpp +++ b/config/cmake_ext_mod/HDFCXXTests.cpp @@ -10,62 +10,6 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifdef OLD_HEADER_FILENAME - -#include <iostream> - -int main(void) { return 0; } - -#endif - - -#ifdef HDF_NO_NAMESPACE - -namespace HDF { -int fnord; -} - -int main(void) { - using namespace HDF; - fnord = 37; - return 0; -} - -#endif - -#ifdef HDF_NO_STD - -#include <string> - -using namespace std; - -int main(void) { - string myString("testing namespace std"); - return 0; -} - -#endif - -#ifdef BOOL_NOTDEFINED -int main(void) { - bool flag; - return 0; -} - -#endif - -#ifdef NO_STATIC_CAST - -int main(void) { - float test_float; - int test_int; - test_float = 37.0; - test_int = static_cast <int> (test_float); - return 0; -} - -#endif - #ifdef CXX_HAVE_OFFSETOF #include <stdio.h> diff --git a/config/cmake_ext_mod/HDFUseCXX.cmake b/config/cmake_ext_mod/HDFUseCXX.cmake index 28e7f8a..580c409 100644 --- a/config/cmake_ext_mod/HDFUseCXX.cmake +++ b/config/cmake_ext_mod/HDFUseCXX.cmake @@ -103,11 +103,6 @@ endmacro () #----------------------------------------------------------------------------- if (CMAKE_CXX_COMPILER_LOADED) foreach (cxx_test - OLD_HEADER_FILENAME - HDF_NO_NAMESPACE - HDF_NO_STD - BOOL_NOTDEFINED - NO_STATIC_CAST CXX_HAVE_OFFSETOF ) HDF_CXX_FUNCTION_TEST (${cxx_test}) |