Project

General

Profile

Support #16127

Support #16096: Fix problems found when attempting to build with gcc 6.3.0

problem compiling larexamples/Algorithms/RemoveIsolatedSpacePoints/PointIsolationAlg.h with gcc 6.3.0

Added by Lynn Garren over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
Other
Target version:
-
Start date:
04/06/2017
Due date:
% Done:

100%

Estimated time:
Spent time:
Experiment:
-
Co-Assignees:
Duration:

Description

This code block was triggered by gcc 6.3.0. Please make the suggested changes in larexamples/Algorithms/RemoveIsolatedSpacePoints/PointIsolationAlg.h

#if ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ >= 6)
// FIXME GCC51
// when this error will be triggered, fix the code to use std::cbegin() and
// std::cend() and remove this check
# error "Update to use std::cbegin()/std::cend() with GCC 5.1 and above" 
#endif

Associated revisions

Revision 87a8d561 (diff)
Added by Gianluca Petrillo over 3 years ago

Updated STL library use with GCC >=5.1.

This solves issue #16127.

History

#1 Updated by Gianluca Petrillo over 3 years ago

  • Category set to Other
  • Status changed from Assigned to Work in progress
  • % Done changed from 0 to 20

It was in fact a trap to determine when the new GCC would chime in with a more C++14 compliant library.
I am on it...

#2 Updated by Gianluca Petrillo over 3 years ago

  • Status changed from Work in progress to Resolved
  • % Done changed from 20 to 100

Replaced the free functions std::begin() and std::end() with the corresponding constant versions std::cbegin() and std::cend().
These are part of C++14 standard, which GCC implemented starting with version 5.1.
All unit tests up to larexamples passed.

The fix has been pushed as larexamples:87a8d5616874bc1b006cffe38c7c00ed92636973.

#3 Updated by Lynn Garren over 3 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF