mardi 6 octobre 2020

Problem with "using" with C++11 on g++ 4.8.5

I have prepared a project on an up-to-date computer using -std=c++11. Now, I have to compile it on g++ 4.8.5 (Red Hat 4.8.5-39). To my surprise, support for C++11 standard on this system seems to be incomplete. Please note, that the project depends on gsoap library which is also older on the production system.

I am using the following construct:

class GeoGrid : public ::GeoGrid::GeoGridServiceSoapBindingProxy
{
public:
  ...
  using ContextType = ::GeoGrid::GeoGrid2__ContextType;
  ...
}

I get the following error on the old system:

api-2-0.h:434:23: error: expected type-specifier before ‘::’ token
   using ContextType = ::GeoGrid::GeoGrid2__ContextType;

I do not know if this is produced due to the old gsoap or just old g++.

My question is if this can be resolved without upgrading the system? I have to admit that I do not completelly understand all the consequences of using ‘::’ token at the beginning, it was simply a lucky guess that works perfectly on the new system.

Aucun commentaire:

Enregistrer un commentaire