Project

General

Profile

Necessary Maintenance #19476

Workaround for GenVector classes not being constexpr

Added by Gianluca Petrillo over 1 year ago. Updated over 1 year ago.

Status:
Accepted
Priority:
Normal
Assignee:
-
Category:
Geometry
Target version:
-
Start date:
03/23/2018
Due date:
% Done:

0%

Estimated time:
Experiment:
-
Duration:

Description

The geometry vector support infrastructure is designed to take the most possible advantage from constexpr expressions, including the vectors themselves (for example, Xaxis = { 1.0, 0.0, 0.0 }).

ROOT GenVector library does not include support for constexpr vectors, although it does not appear to be any underlying reason.
GCC 6 did a good job in discovering that those vectors could actually be treated as constexpr even if they were not explicitly supporting that. Clang 5.0 does not.
I have opened a request to support this feature as JIRA 9320. Until that happens, our code must be crippled to remove that support.

Therefore, I have replaced all the instances where constexpr is giving trouble with GENVECTOR_CONSTEXPR macro defined in larcoreobj:source:larcoreobj/SimpleTypesAndConstants/geo_vectors.h (larcoreobj:7733b03121641e8e86ff3e4b9c66d512331980c6).
At each ROOT version we adopt, it should be verified that the request is not yet implemented and update the commit above, or finally restore constexpr.
To make sure we don't forget, each time we update ROOT version the above commit will trigger an error.

Associated revisions

Revision b0845c71 (diff)
Added by Gianluca Petrillo over 1 year ago

Removing constexpr support for vectors (issue #19476)

History

#1 Updated by Gianluca Petrillo over 1 year ago

  • Description updated (diff)

(added commit number)

#2 Updated by Gianluca Petrillo over 1 year ago

  • Description updated (diff)

#3 Updated by Lynn Garren over 1 year ago

  • Status changed from New to Accepted


Also available in: Atom PDF