Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade code base to use C++11 #104

Open
PeterBowman opened this issue Apr 20, 2017 · 4 comments
Open

Upgrade code base to use C++11 #104

PeterBowman opened this issue Apr 20, 2017 · 4 comments

Comments

@PeterBowman
Copy link
Member

Backward compatibility should not be an issue unless we plan on supporting quite old systems (e.g. Ubuntu Precise, which is reaching its EOL at the time of writing).

@PeterBowman
Copy link
Member Author

PeterBowman commented Aug 21, 2017

Starting from YARP 2.3.72 (scheduled release on 15th November), C++11 will be required for YARP-dependent code (2.3.70 added this prerequisite to compile YARP itself). Cron jobs are currently breaking on upstream devel branch: https://travis-ci.org/asrob-uc3m/robotDevastation/builds/266750949.

PS said errors can be easily solved by switching the adequate compiler option. This issue aims at introducing C++11 features into RD code.

@PeterBowman
Copy link
Member Author

See #109 regarding previous comment. This issue is blocked for that reason.

@PeterBowman
Copy link
Member Author

Question: do we want a smooth transition to C++11 so that unsupported compilers may still build RD (CMake has tools for gradually introducing new language features), or just start using modern C++ constructs straight away?

Remark: Trusty fully supports C++11 via gcc (ref1 + ref2). Same applies for MSVC starting from VS 2015 (ref). The previous question boils down to deciding on which distros are supported by RD.

@jgvictores
Copy link
Member

This can be answered from diverse perspectives.

  1. YARP. In relation to connecting PC and robots, both parts should agree on protocol. If YARP versions have to match, the device with the oldest OS would be the bottleneck (i.e. the TEO Debian 6.0 affair). Luckily, the low-level of YARP doesn't break compatibility that often. The part that does often change protocol is remote_controlboard, which is used in TEO but not in RD. This means that in RD, YARP versions do not have to match perfectly. We can use the latest stuff on the PC version (which is where we are considering c++11) and maybe older stuff on more limited equipment.
  2. Trusty/gcc is good. Regarding Windows, a though experiment would be to think about supporting XP. It seems kind of possible via the 140_xp platform toolset. If not, well, mingw also seems to provide some support.
  3. Robot Devastation has always been about playing around, trying to do things we have no idea of how to do!

Given (3), and since we are not breaking backward compatibility in terms of (1) or (2), I'd say "Let's go for it!" and would move on to using modern C++ (as in c++11, not c++17 yet) constructs straight away!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants