OpenSDN-io/community

C++11 transition

Opened this issue · 5 comments

  1. Ability to compile OpenSDN parts using C++11 standard of language
  2. Elemination of old (deprectated) constructions: auto_ptr, NULL, etc

Requires:

  • Update log4cplus to the newer version (because the older one uses auto_ptr): setLayout
  • Refactoring of contrail-common/database (gen_if.cc, cql_if.cc,etc), since it uses boost::bind, which is not compatible with std::unique_ptr

Nice. Do we have a full list of what remains to be done to complete this?

There are several new commits, that have already passed CI/CD:

Now I have to verify them on my test facility.

To accomplish all work, next steps are neccesary:

  • update of log4cplus library to newer versions that use unique_ptr instead of auto_ptr;
  • refactoring of contrail-common/database (this is large amount of work and it can be done later);
  • testing of new code on OpenStack installations (with at least 2 hypervisors).

Updates?

I introduced a newer version of log4cplus C++ library into the build container and updated all the code that uses log4cplus: https://gerrit.opensdn.io/c/opensdn-io/tf-controller/+/675

There is still one unit test that sometime work and sometime - not. I'm concentrating on it not.

To make OpenSDN fully C++11 comliant, it's neccesary to refactor CQL database driver, but I don't think I can accomplish this before the first release. So, I would say, nowadays we are 95% C++ compliant.