Page MenuHomePhabricator

Linux compiler error in ImageStatisticsContainer
Closed, ResolvedPublic

Description

The compiler gcc 4.9.2 on Ubuntu 15.04 64-bit raises errors in file mitkImageStatisticsContainer.cpp:

'cbegin' and 'cend' is not a member of 'std'

It can be resolved by using std::vector member functions directly.

Event Timeline

eisenman triaged this task as High priority.Feb 1 2019, 3:58 PM
eisenman created this task.
eisenman moved this task from Backlog to Bugsquashing - In Progress on the MITK board.

Just as a remark (but I think an important one).

gcc 4.9.2 on Ubuntu 15.04 64-bit r

is not a supported tier 1 platform any more. So using C++14 features (like std:::cbegin/std::end) is totaly fine and compliant. In general std::cbegin() and co should be prefered compared to direct usage of members, because it decouples more from concrete implementation details. In this case however it makes no real difference so the change is not problematic.

But keep in mind we already have several other code fragments where c++14 features are already used (including std:cbegin and co). So if you realy need support for older plattforms, you should trigger a more general discussion, because currently this patch is just a workarorung and bying time, but is not sustainable solution.

Thank you for clarification! Indeed, this is an important remark! Seems that we checked on an outdated website for minimum compiler version before fixing this.