Add tests for C++-11 support

Description

Include experimental compiler support likely to be found on/for CentOS 6

Look at the bison 3.3 code now in hyrax-deps to see how it tests for various versions of C++

Issues found in libdap: There was some problem with using --std=c+0x on CentOS 6 and the code in d4_ce - the parser C+ files. I just decided to bail on that. libdap4 will build with c++11 and a compiler that supports it correctly.

BES: There are a number of issues in the code. I'll summarize them:
In modules/cmr_module: CmrApi.cc, the lines "BESDEBUG(MODULE, msg << endl);" fail on OSX with -std=cxx11

This problem was caused by a stringstream being passed to a ostream using <<. When I accessed the string object from the stringstream, everything went well.

In modules/HDF4_handler: There are 4 or 5 files that use g+'s typeof (e.g., "T (*templatlonptr)[majordim][minordim] = (typeof templatlonptr) latlon;") but that's a g+ extension. Use decltype instead or do something else. I could not get decltype to work as a direct replacement.

The problem appears to be limited to cmr_module and hdf4_handlder.

I coded around it by not using the temp variable and computing the offsets into the data block by hand.

Activity

Show:
James Gallagher
April 5, 2019, 6:26 PM

Done. After about a day’s more work. I have the hdf4 & 5 code building.

The libdap4 issue is more complex; I think I’ll have to tweak the code bison generates to get it to work with c++0x on Centos 6. But… I can just not use the c++11/0x option when that code is compiled. Maybe.

James Gallagher
April 5, 2019, 8:18 PM

Done

Assignee

James Gallagher

Reporter

James Gallagher

Priority

Medium

Labels

Story Points

1

Fix versions

Epic Link

Time remaining

0m
Configure